Page MenuHomePhabricator

update ElasticSearch search documents
Needs RevisionPublic

Authored by Lswith on Nov 13 2015, 6:54 AM.
Tags
None
Referenced Files
F14012630: D14476.diff
Fri, Nov 1, 2:54 PM
Unknown Object (File)
Sep 28 2024, 1:21 PM
Unknown Object (File)
Sep 25 2024, 12:12 PM
Unknown Object (File)
Sep 25 2024, 5:47 AM
Unknown Object (File)
Sep 21 2024, 2:31 AM
Unknown Object (File)
Sep 15 2024, 11:06 PM
Unknown Object (File)
Sep 3 2024, 11:34 PM
Unknown Object (File)
Aug 27 2024, 12:00 AM
Subscribers

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?