AddFilter Depricated on BoolQuery

19 views
Skip to first unread message

Nikolay Nikolov

unread,
Jul 28, 2016, 2:20:12 PM7/28/16
to Elastica - Elasticsearch PHP Client
Hi, I am using the addFilter for the BoolQuery in this way:

$boolQuery = new \Elastica\Query\Bool();
$filter
= new \Elastica\Query\Terms();
$filter
->setTerms('active', array(1));
$boolQuery
->addFilter($filter);


I am using the Filter because it is not changing the Score on the results. If I set addMust, then the score will change. What need I do to replace the addFilter, so the score is still the same, when I am filtering results.


Thanks

Nik

Nikolay Nikolov

unread,
Jul 28, 2016, 3:18:16 PM7/28/16
to Elastica - Elasticsearch PHP Client

ruflin

unread,
Aug 2, 2016, 3:49:15 AM8/2/16
to Elastica - Elasticsearch PHP Client
As you already using the filter, I would expect the score not to change? Is the above working or not?
Reply all
Reply to author
Forward
0 new messages