Changeset View
Changeset View
Standalone View
Standalone View
src/docs/user/cluster/cluster_search.diviner
@title Cluster: Search | @title Cluster: Search | ||||
@group cluster | @group cluster | ||||
Overview | Overview | ||||
======== | ======== | ||||
You can configure Phabricator to connect to one or more fulltext search | You can configure Phorge to connect to one or more fulltext search | ||||
services. | services. | ||||
By default, Phabricator will use MySQL for fulltext search. This is suitable | By default, Phorge will use MySQL for fulltext search. This is suitable | ||||
for most installs. However, alternate engines are supported. | for most installs. However, alternate engines are supported. | ||||
Configuring Search Services | Configuring Search Services | ||||
=========================== | =========================== | ||||
To configure search services, adjust the `cluster.search` configuration | To configure search services, adjust the `cluster.search` configuration | ||||
option. This option contains a list of one or more fulltext search services, | option. This option contains a list of one or more fulltext search services, | ||||
Show All 9 Lines | [ | ||||
"roles": { | "roles": { | ||||
"read": true, | "read": true, | ||||
"write": true | "write": true | ||||
} | } | ||||
} | } | ||||
] | ] | ||||
``` | ``` | ||||
When a user makes a change to a document, Phabricator writes the updated | When a user makes a change to a document, Phorge writes the updated | ||||
document into every configured, writable fulltext service. | document into every configured, writable fulltext service. | ||||
When a user issues a query, Phabricator tries configured, readable services | When a user issues a query, Phorge tries configured, readable services | ||||
in order until it is able to execute the query successfully. | in order until it is able to execute the query successfully. | ||||
These options are supported by all service types: | These options are supported by all service types: | ||||
| Key | Description | | | Key | Description | | ||||
|---|---| | |---|---| | ||||
| `type` | Constant identifying the service type, like `mysql`. | | `type` | Constant identifying the service type, like `mysql`. | ||||
| `roles` | Dictionary of role settings, for enabling reads and writes. | | `roles` | Dictionary of role settings, for enabling reads and writes. | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
Rebuilding Indexes | Rebuilding Indexes | ||||
================== | ================== | ||||
After adding new search services, you will need to rebuild document indexes | After adding new search services, you will need to rebuild document indexes | ||||
on them. To do this, first initialize the services: | on them. To do this, first initialize the services: | ||||
``` | ``` | ||||
phabricator/ $ ./bin/search init | phorge/ $ ./bin/search init | ||||
``` | ``` | ||||
This will perform index setup steps and other one-time configuration. | This will perform index setup steps and other one-time configuration. | ||||
To populate documents in all indexes, run this command: | To populate documents in all indexes, run this command: | ||||
``` | ``` | ||||
phabricator/ $ ./bin/search index --force --background --type all | phorge/ $ ./bin/search index --force --background --type all | ||||
``` | ``` | ||||
This initiates an exhaustive rebuild of the document indexes. To get a more | This initiates an exhaustive rebuild of the document indexes. To get a more | ||||
detailed list of indexing options available, run: | detailed list of indexing options available, run: | ||||
``` | ``` | ||||
phabricator/ $ ./bin/search help index | phorge/ $ ./bin/search help index | ||||
``` | ``` | ||||
Advanced Example | Advanced Example | ||||
================ | ================ | ||||
This is a more advanced example which shows a configuration with multiple | This is a more advanced example which shows a configuration with multiple | ||||
different services in different roles. In this example: | different services in different roles. In this example: | ||||
- Phabricator is using an Elasticsearch 2 service as its primary fulltext | - Phorge is using an Elasticsearch 2 service as its primary fulltext | ||||
service. | service. | ||||
- An Elasticsearch 5 service is online, but only receiving writes. | - An Elasticsearch 5 service is online, but only receiving writes. | ||||
- The MySQL service is serving as a backup if Elasticsearch fails. | - The MySQL service is serving as a backup if Elasticsearch fails. | ||||
This particular configuration may not be very useful. It is primarily | This particular configuration may not be very useful. It is primarily | ||||
intended to show how to configure many different options. | intended to show how to configure many different options. | ||||
Show All 33 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0