Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Chimo 7d832b7ff4
Handle /actions/apisearchjson.php searches
7 mēnešus atpakaļ
actions Fix encoding issues with accented characters 7 mēnešus atpakaļ
classes Initial multi-field search page 11 mēnešus atpakaļ
lib Handle /actions/apisearchjson.php searches 7 mēnešus atpakaļ
scripts import-notice: Fix command-line flags 11 mēnešus atpakaļ
.gitignore First commit 1 gadu atpakaļ
ElasticSearchPlugin.php Initial multi-field search page 11 mēnešus atpakaļ
README.md Update README 1 gadu atpakaļ
composer.json First commit 1 gadu atpakaļ
composer.lock First commit 1 gadu atpakaļ

README.md

Elasticsearch Backend for GNU social

Installation

  1. Navigate to your /local/plugins directory (create it if it doesn’t exist)
  2. git clone https://github.com/chimo/gs-elasticsearch.git ElasticSearch
  3. Run composer install in the ElasticSearch folder to install the dependencies

Configuration

Tell /config.php to use it with (replace 127.0.0.1:9200 with the address/port of your elasticsearch backend server):

    $config['elasticsearch']['hosts'] = [ '127.0.0.1:9200' ];
    $config['elasticsearch']['index_name'] = 'gnusocial';
    addPlugin('ElasticSearch');

Usage

You can use the Lucene query syntax when searching.

Searching Notices

Supported fields:

  • text: Filters by notice text (default field)
  • author: Notice author (in webfinger format: username@example.org)
  • type: Notice type (ex: post, share, like, etc)
  • created: Date the notice was created

The /search/notice page searches notice text by default. You can filter by notice author with the author field parameter.

For example, the following input will find all notices containing the word “social”: social

The following input will find all notices containing the word “social” authored by username “gnu”: author:gnu social

Searching Profiles

Supported fields:

  • nickname (default field)
  • fullname
  • bio
  • location
  • created
  • modified

The /search/people page searches profile nicknames by default. You can fiter by the other fields above.