Page MenuHomePhabricator

update ElasticSearch search documents
Needs RevisionPublic

Authored by Lswith on Nov 13 2015, 6:54 AM.

Details

Reviewers
joshuaspence
epriestley
Group Reviewers
Blessed Reviewers
Summary

The Documents stored in Elasticsearch currently are not well defined.
This change allows the features of Elasticsearch (such as custom mappings)
to be enabled on each individual field of a search document. This change
will allow the body to be mapped differently to the titl.

This diff is a precursor to more changes. Once this is implemented, the mappings for PhabricatorSearchAbstractDocuments can be better defined in Elasticsearch. These mappings are what determines how elasticsearch will preform its search for each field. The more granular these mappings are, the better the search can become (different fields can have different types of search).

I came to this conclusion after realising that T9460 is caused by the dynamic mappings being turned off. This mean that the required parts of the schema were not being mapping and could not be queried on. The reason the dynamic mappings were turned off are in T8602.

Test Plan
  • recreate Elasticsearch index
  • do a search query
  • see that the query results haven't changed

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8818
Build 10287: arc lint + arc unit

Event Timeline

Lswith retitled this revision from to update ElasticSearch search documents.
Lswith updated this object.
Lswith edited the test plan for this revision. (Show Details)

at some stage I'm hoping parts of the body and cmnt can be broken out to allow for better searches of

code statements

and natural language.

This revision now requires changes to proceed.Nov 15 2015, 4:46 PM
joshuaspence edited edge metadata.

Apologies @epriestley. @Lswith submitted this diff on my behalf, but it doesn't quite contain enough context.

Basically, we are looking into T8602 and T9460, which are impacting on the utility of Elasticsearch on our install. I had a discussion with @Lswith regarding this and I think that he had made some progress. @Lswith, can you please add context to this diff. Specifically, what problem does this solve? Does this diff actually improve any search results or is this just a precursor to a subsequent change?