Page MenuHomePhabricator

Fix support for elasticsearch 2
ClosedPublic

Authored by Paladox on Sep 30 2016, 5:06 PM.

Details

Maniphest Tasks
T146843: Re-evaluate how we implement phabricator's search engine
Reviewers
Paladox
mmodell
Commits
rPHAB1a9be39e825e: Fix support for elasticsearch 2
Patch without arc
git checkout -b D394 && curl -L https://phabricator.wikimedia.org/D394?download=true | git apply
Summary

If a user has elasticsearch 2 or higher and has search.elastic.version set
to 2 or higher they will use the new lastModified (date) field instead of
the deprecated _timestamp which is kept for backword compatibility with
elasticsearch 1.

This fixes indexing so search can pick the results up.

https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-timestamp-field.html

@EBernhardson helped me a lot with the fix, he told me what things to do, I just applied it and uploaded the patch.

Fixes T146843

Change-Id: I5509eef6fcf0b52d5059e14c00d11afea2df538d

Diff Detail

Repository
rPHAB Phabricator
Branch
arcpatch-D394 (branched from wmf/stable)
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 1083
Build 1571: differential-jessieJenkins
Build 1570: arc lint + arc unit

Event Timeline

Paladox updated this revision to Diff 1055.Sep 30 2016, 5:06 PM
Paladox retitled this revision from to Fix support for elasticsearch 2.
Paladox updated this object.
Paladox edited the test plan for this revision. (Show Details)
Restricted Application added a reviewer: mmodell. · View Herald TranscriptSep 30 2016, 5:06 PM
Paladox updated this object.Sep 30 2016, 5:07 PM
Paladox edited edge metadata.
Paladox updated the revert plan for this revision. (Show Details)
Paladox added a subscriber: EBernhardson.
Paladox accepted this revision.Sep 30 2016, 5:49 PM
Paladox added a reviewer: Paladox.
This revision is now accepted and ready to land.Sep 30 2016, 5:49 PM
mmodell updated this revision to Diff 1061.Oct 1 2016, 11:47 PM
mmodell edited edge metadata.

use a variable for timestamp_field_key

This is cleaner than using if / else conditionals.

Paladox closed this revision.Oct 2 2016, 12:47 AM