Commit Graph

96 Commits

Author SHA1 Message Date
Thibaud Fabre
3f1230a86c Add missing include 2016-10-21 09:41:04 +02:00
Thibaud Fabre
299b24d4fb Update class for mapping type constants 2016-10-19 13:31:17 +02: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
Nicolas Maillat
ccc5315ad3 Merge pull request #1569 from mdarse/fix-range-expression-private-fields
Fix range expression with private fields
2015-11-13 20:36:43 +01:00
Mathieu Darse
e09e86df1a Fix range expression with private fields
Post processor hook was not called
2015-11-13 20:08:05 +01:00
Mathieu Darse
6913d67e9a Convert dates to date ranges on timestamp keys 2015-11-13 19:28:59 +01:00
Mathieu Darse
0f0c007e19 s/metadatatag/key 2015-11-13 10:28:06 +01:00
Mathieu Darse
31e4f33275 Check input date before submitting to ES 2015-11-13 10:28:06 +01:00
Mathieu Darse
0cd9933ac6 Handle search with on timestamp
PHRAS-689
2015-11-13 10:28:05 +01:00
Benoît Burnichon
5dc1fbe2cb Merge pull request #1564 from mdarse/query-on-exif
Query support for metadata tags
2015-11-12 22:47:24 +01:00
Mathieu Darse
b8c3ea91c8 Make range expression throw on invalid value 2015-11-10 17:08:41 +01:00
Mathieu Darse
8e5d09bd76 Test value compatibility before creating ES query 2015-11-10 16:40:10 +01:00
Mathieu Darse
c89d48c6f7 BooleanOperator → BooleanExpression 2015-11-10 14:56:50 +01:00
Mathieu Darse
407470ab10 Rename key-value expression classes 2015-11-10 13:04:28 +01:00
Mathieu Darse
e953998ca7 Use analysis on key-value expressions (with colon operator) 2015-11-09 19:08:40 +01:00
Mathieu Darse
5784b158a2 Extend Key interface to support raw index fields 2015-11-09 19:06:09 +01:00
Mathieu Darse
9d3dfa5653 Manage metadata tags from structure 2015-11-09 19:04:54 +01:00
Benoît Burnichon
f684550ab1 Merge pull request #1555 from bburnichon/rebase-web-gallery-v4
Rebase web gallery v4
2015-11-09 17:48:22 +01:00
Mathieu Darse
77b9faaa4e Handle equality test on metadata
Still need some work on testing side
2015-11-06 19:34:09 +01:00
Mathieu Darse
3d7ab6a292 Move field logic from RangeExpression to FieldKey
- Prevent Demeter’s Law violation
2015-11-06 19:10:26 +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
Benoît Burnichon
7912d2932b Fixup translation instructions 2015-11-04 16:31:34 +01:00
Mathieu Darse
a666ce75c6 Use equality syntax on facet queries 2015-11-04 11:33:48 +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
95753167c8 InExpression → FieldMatchExpression (PHRAS-688) 2015-10-12 17:04:02 +02:00
Mathieu Darse
6abfd70e80 Move query build logic for native keys into Key class (PHRAS-688) 2015-10-12 16:42:04 +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
d6a82370a9 Merge branch 'master' into ar-731-status-search-dsl
Conflicts:
	lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/RecordIndexer.php
2015-10-06 12:26:03 +02:00
Mathieu Darse
4424d43b18 Put flags in ES structure 2015-09-28 20:27:29 +02:00
Nicolas Maillat
15e632b44e Merge pull request #1502 from mdarse/ar-731-status-search-dsl
PHRAS-731 Add status match DSL
2015-09-15 09:22:17 +02:00
Mathieu Darse
8b87e94ff2 Add status match DSL 2015-09-14 19:25:44 +02:00
Benoît Burnichon
a41df40d49 Merge pull request #1497 from mdarse/fix-691-cross-field-query
PHRAS-691
2015-09-08 10:52:07 +02:00
Mathieu Darse
03cddfadc9 Fix freetext after IN query
"Foo IN Bar AND Baz" causes AST construction to fail.
2015-09-07 17:35:03 +02:00
Mathieu Darse
a3efd78055 Fix cross field queries (see PHRAS-691) 2015-09-07 16:05:10 +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
ed0affa921 buildConceptQueriesForFields() replaces buildConceptQueries() 2015-08-27 17:35:34 +02:00
Mathieu Darse
064c5e01a6 Wrap text and concept queries with a single filtered query 2015-08-26 19:29:26 +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
Benoît Burnichon
b1bdd73662 Merge pull request #1478 from mdarse/fix-concept-query-builder
Fix concept query builder & private field wrapping
2015-08-26 18:07:58 +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
d26330a17f Fix date validation, range query & equality operator 2015-08-24 11:26:46 +02:00
Jean-Yves Gaulier
41758fe341 #PHRAS-622 #time 5m
cs to fix errors in phpstorm
2015-08-17 15:18:33 +02:00