mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Refactor thesaurus query build
- Look for text nodes and infer the concepts behind term using thesaurus - Use value objects for thesaurus terms and concepts - Pass a QueryContext holding allowed fields and locales informations when building the Elasticsearch query - Change type hinting and name of query building method on nodes - Remove unused method Node#isFullTextOnly() - Move getFieldsStructure from RecordIndexer to RecordHelper for reusing field structure in SearchEngine
This commit is contained in:
@@ -23,19 +23,9 @@ class Query
|
||||
return $this->root->getTextNodes();
|
||||
}
|
||||
|
||||
/*
|
||||
* This method seems weird to me, the implementation returns true when the
|
||||
* query doesn't contain IN statements, but that doesn't define a full text
|
||||
* search.
|
||||
*/
|
||||
public function isFullTextOnly()
|
||||
public function build(QueryContext $context)
|
||||
{
|
||||
return $this->root->isFullTextOnly();
|
||||
}
|
||||
|
||||
public function getElasticsearchQuery($fields = array())
|
||||
{
|
||||
return $this->root->getQuery($fields);
|
||||
return $this->root->buildQuery($context);
|
||||
}
|
||||
|
||||
public function dump()
|
||||
|
Reference in New Issue
Block a user