1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

T4446: Fix Elasticsearch support for 1.0 and above

Summary:
Elasticsearch 1.0 deprecated the "filter" top-level
parameter in favor of "post_filter" which is applied
after scores and so forth are calculated.

Instead search field.corpus with a term query.

Test Plan:
Tested against Elasticsearch 1.1.1, able to perform
basic queries without query parse errors.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T4446

Differential Revision: https://secure.phabricator.com/D9321
This commit is contained in:
Chad Horohoe 2014-05-28 15:36:27 -07:00 committed by epriestley
parent c7a7574f0c
commit dd3dfde983

View file

@ -97,7 +97,7 @@ final class PhabricatorSearchEngineElastic extends PhabricatorSearchEngine {
if (strlen($query->getParameter('query'))) {
$spec[] = array(
'field' => array(
'term' => array(
'field.corpus' => $query->getParameter('query'),
),
);