EXTRA_FILTER
EXTRA_FILTER
Percolator class.
$_index : \Elastica\Index
Index object.
__construct(\Elastica\Index $index)
Construct new percolator.
\Elastica\Index | $index |
registerQuery(string $name, string|\Elastica\Query|\Elastica\Query\AbstractQuery $query, array $fields = array()) : \Elastica\Response
Registers a percolator query, with optional extra fields to include in the registered query.
string | $name | Query name |
string|\Elastica\Query|\Elastica\Query\AbstractQuery | $query | Query to add |
array | $fields | Extra fields to include in the registered query and can be used to filter executed queries. |
unregisterQuery(string $name) : \Elastica\Response
Removes a percolator query.
string | $name | query name |
matchDoc(\Elastica\Document $doc, string|\Elastica\Query|\Elastica\Query\AbstractQuery $query = null, string $type = 'type', array $params = array()) : array
Match a document to percolator queries.
\Elastica\Document | $doc | |
string|\Elastica\Query|\Elastica\Query\AbstractQuery | $query | Query to filter the percolator queries which are executed. |
string | $type | |
array | $params | Supports setting additional request body options to the percolate request. [ Percolator::EXTRA_FILTER, Percolator::EXTRA_QUERY, Percolator::EXTRA_SIZE, Percolator::EXTRA_TRACK_SCORES, Percolator::EXTRA_SORT, Percolator::EXTRA_AGGS, Percolator::EXTRA_HIGHLIGHT ] |
With matching registered queries.
matchExistingDoc(string $id, string $type, string|\Elastica\Query|\Elastica\Query\AbstractQuery $query = null, array $params = array()) : array
Percolating an existing document.
string | $id | |
string | $type | |
string|\Elastica\Query|\Elastica\Query\AbstractQuery | $query | Query to filter the percolator queries which are executed. |
array | $params | Supports setting additional request body options to the percolate request. [ Percolator::EXTRA_FILTER, Percolator::EXTRA_QUERY, Percolator::EXTRA_SIZE, Percolator::EXTRA_TRACK_SCORES, Percolator::EXTRA_SORT, Percolator::EXTRA_AGGS, Percolator::EXTRA_HIGHLIGHT ] |
With matching registered queries.
getIndex() : \Elastica\Index
Return index object.