Commit Graph

51 Commits

Author SHA1 Message Date
Thibaud Fabre
299b24d4fb Update class for mapping type constants 2016-10-19 13:31:17 +02:00
Thibaud Fabre
11d25021cc CS fixes 2016-10-19 06:51:37 +02:00
Benoît Burnichon
d0bae320d3 Check type of field before considering it a Date 2016-01-21 13:13:20 +01:00
Benoît Burnichon
88427efa4c Fixup DI of QueryCompiler.
As compiler was not using structure on its own, extract it and replace instantiation by a factory.
2015-11-16 13:08:32 +01:00
Mathieu Darse
3b2d6b05a0 Pass structure to query visitor & enable range generation for regular fields (equal expression) 2015-11-13 20:41:19 +01:00
Mathieu Darse
6913d67e9a Convert dates to date ranges on timestamp keys 2015-11-13 19:28:59 +01:00
Mathieu Darse
0cd9933ac6 Handle search with on timestamp
PHRAS-689
2015-11-13 10:28:05 +01:00
Mathieu Darse
c89d48c6f7 BooleanOperator → BooleanExpression 2015-11-10 14:56:50 +01:00
Mathieu Darse
9f923e0409 Refactor AST for match expression 2015-11-10 13:35:12 +01:00
Mathieu Darse
7353945d3c Refactor binary expression handling 2015-11-10 13:19:50 +01:00
Mathieu Darse
9635efc1e3 Refactor children count assertions 2015-11-10 13:11:45 +01:00
Mathieu Darse
407470ab10 Rename key-value expression classes 2015-11-10 13:04:28 +01:00
Mathieu Darse
0bb61bd882 Remove metadata tag validation from query compiler 2015-11-09 19:07:31 +01:00
Mathieu Darse
467e530a93 Handle inequality comparisons with technical data. 2015-11-06 10:16:33 +01:00
Mathieu Darse
713442c7b4 Merge metadata & native key expressions
Do not delegates query building to Key instance anymore.
2015-11-06 10:16:33 +01:00
Mathieu Darse
803a9010a5 Pass metadata key as value object 2015-11-06 10:16:31 +01:00
Mathieu Darse
13186209f7 Handle matching on file metadata 2015-11-06 10:14:23 +01:00
Benoît Burnichon
94bf685437 Merge pull request #1525 from mdarse/new-in-syntax
Grammar unification
2015-11-04 21:16:03 +01:00
Mathieu Darse
570808e793 Switch \Exception to search engine’s Exception 2015-11-04 19:30:56 +01:00
Mathieu Darse
f3a15fb19f Fix text merging 2015-11-04 12:49:49 +01:00
Mathieu Darse
652f8be213 Move boolean logic in is own namespace 2015-11-03 18:42:56 +01:00
Mathieu Darse
e86918de4b Merge native keys, flag & fields syntaxes together (PHRAS-685)
- « IN » syntax was removed
- Tests where updated with new serialized representations (IN is replaced by MATCHES)
- Removed tests of native fields with IN syntax
- 4 tests (lines 77, 80, 83 and 86 in queries.csv) are not passing but
they were not really part of specified functionality. They need some work eventually.
2015-10-12 19:50:23 +02:00
Mathieu Darse
fbac292430 Remove old database/collection/type/id grammar pieces 2015-10-12 18:02:35 +02:00
Mathieu Darse
95753167c8 InExpression → FieldMatchExpression (PHRAS-688) 2015-10-12 17:04:02 +02:00
Mathieu Darse
d23514c5d0 Move key-value related AST to dedicated namespace (PHRAS-688) 2015-10-12 14:27:32 +02:00
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
4424d43b18 Put flags in ES structure 2015-09-28 20:27:29 +02:00
Mathieu Darse
8b87e94ff2 Add status match DSL 2015-09-14 19:25:44 +02:00
Jean-Yves Gaulier
e8f61a443b PHRAS-676 #time 3h
new : returns facet on "type" (image, video, ...)
new : query on pseudo-field "type", ex:  "type:image"
2015-09-04 14:34:25 +02:00
Mathieu Darse
1d0257554b Fix code style on latest query parser feature & add tests 2015-07-02 19:06:44 +02:00
Jean-Yves Gaulier
ce80c4222b PHRAS-482 #time 1m
CS
2015-07-02 11:09:11 +02:00
Jean-Yves Gaulier
d7c3a9943f PHRAS-482 #time 4h
- added "recordid:xxx"
- added "base:yyy" (makes "Base" facets ok)
to query parser
2015-07-01 17:54:32 +02:00
Mathieu Darse
0e6bfe4874 Fix context regression from #1347 2015-04-15 18:56:55 +02:00
Mathieu Darse
c813eee73f Add equality expressions 2015-04-15 18:28:12 +02:00
Mathieu Darse
34a88d9ac6 Simpler range AST constructors 2015-04-15 18:23:36 +02:00
Mathieu Darse
b3f9dd4ca2 Implement inequality in query visitor & fix IN expressions 2015-04-15 18:23:36 +02:00
Mathieu Darse
38465a591f Strict facet matching
Clicking on a facet value on the left pane now return the expected result count.

This commit implement a new "raw" matcher. It can be used like
`r"some raw value"`. It operate on the the `.raw` multi-field and skips all
analysis.
Escaping `"` is supported by prepending a backslash `\"`. You can also escape
the escaping character `\` by doubling it (`\\`).

Adds a new `ContextAbleInterface` to differenciate matcher supporting an
optional context from those who can't.

Fixes an issue with `QueryContext::narrowToFields()` ignoring passed fields.
2015-04-09 20:32:13 +02:00
Mathieu Darse
a9a1d44447 Fix term/text/context nodes merging 2015-03-30 16:30:12 +02:00
Mathieu Darse
fc6b61e159 Fix quoted text node generation 2015-03-30 16:30:12 +02:00
Mathieu Darse
67dcd09a39 Add "collection:" query support 2015-03-17 19:45:24 +01:00
Mathieu Darse
dfc386cce1 Clean query visitor text merging 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
Mathieu Darse
4d1ce3e8dc Fix visitor issue with term expressions 2015-02-25 12:19:00 +01:00
Mathieu Darse
712850ac67 Update grammar and AST for bracket notation 2015-02-25 12:19:00 +01:00
Mathieu Darse
dc2c9f8c7f 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
2015-01-20 15:05:15 +01:00
Mathieu Darse
9fff4fdbc0 Allow empty queries (match all) 2014-12-17 23:17:07 +01:00
Mathieu Darse
2aa0b0f1a8 Proper left-associativity in query operators
Remove previous lambda/curring based method
Grammar was simplified for EXCEPT case
Cleanup unused constants
2014-12-03 17:16:22 +01:00
Mathieu Darse
e9c9fe2376 Add Except query support 2014-11-27 18:27:30 +01:00
Mathieu Darse
810a496521 Refactor query visitor 2014-11-26 11:42:39 +01:00
Mathieu Darse
c3867d412e Search\SearchQuery -> Search\Query 2014-11-26 11:39:56 +01:00