Commit Graph

12 Commits

Author SHA1 Message Date
Mathieu Darse
e4ec73c58b Same grammar path for native keys than « IN » expressions
- Replace Database/Collection/Type/RecordIdentifier specific AST with a generic KeyValueExpression
- « IN » queries in regular fields are still using InExpression right now
- Add some tests for « type:XXXX » queries
2015-10-06 18:41:51 +02:00
Mathieu Darse
ed0affa921 buildConceptQueriesForFields() replaces buildConceptQueries() 2015-08-27 17:35:34 +02:00
Mathieu Darse
d6a44c8a52 Lower-level API to build concept queries
Removes wrapPrivateFieldConceptQueries().
The goal is to wrap text and concept queries with a single call to wrapPrivateFieldQueries().
2015-08-26 19:29:26 +02:00
Mathieu Darse
9d6a428208 Remove concept queries wrapping method 2015-08-26 19:29:26 +02:00
Mathieu Darse
e058814638 Test TextNode with private fields and concepts on private fields 2015-08-26 19:29:26 +02:00
Mathieu Darse
c596914ab9 Fix concept query builder & private field wrapping
Concept queries on private fields where adding a « must » clause to
restrict match on certain collections only. Boolean queries do not
enforce one « should » clause match at least once a « must » clause is
added to it.
To make queries on private fields more robust & performants, these are
now wrapped in a filtered query with a collection filter.
2015-08-26 15:21:02 +02:00
Mathieu Darse
a31442368b Fix number field search
Search with non numeric content will not hit number field (it breaks elasticsearch and is useless anyway)

- Rename QueryHelper::buildPrivateFieldQueries() to wrapPrivateFieldQuery().
    - Signature changed too, the third parameter is dropped an QueryContext is replaced by an array of Field.
    - Query builder closure is now passed an array of Field, not of index field names.
- Remove Field::toConceptPathIndexFieldArray() because method name was beyond understanding (and also because it wasn't needed anymore)
- Various AST node types have changed due to previous API changes
2015-07-23 17:39:11 +02:00
Mathieu Darse
1e31b68c5f Refactor Term (Thesaurus), Text and Raw queries to work with private fields
Also fix a bug in QueryHelper::applyBooleanClause()
2015-07-10 20:58:37 +02:00
Mathieu Darse
570e4fea81 Test TextNode
Make buildConceptQueries() return early when no concepts are available (do not
call getFields() uselessly anymore).
2015-07-03 16:54:47 +02:00
Mathieu Darse
c917c7f952 Thesaurus matching while indexing records
- Add a new hydrator to ask query thesaurus on the fly
- Add a filtering system on thesaurus
- And a databox filter friend
2015-03-03 18:50:34 +01:00
Mathieu Darse
fe7e63b3d7 QuotedTextNode don't inherit anymore from TextNode
- Quoted text do not hit the thesaurus anymore
- getTextNodes() was misleading, renamed to getTermNodes()
2015-02-25 12:22:52 +01:00
Mathieu Darse
8c1848afae Expression context support in thesaurus lookup 2015-02-25 12:22:13 +01:00