Commit Graph

28 Commits

Author SHA1 Message Date
jygaulier
a70bf2fc70 PHRAS-1304_AUTO-COMPLETION_MASTER (#2061)
* PHRAS-1304_AUTO-COMPLETION_MASTER
ported from 4.0

* PHRAS-1304_AUTO-COMPLETION_MASTER
fix

* PHRAS-1304_AUTO-COMPLETION_MASTER
fix

* PHRAS-1304_AUTO-COMPLETION_MASTER
bump php version to 5.5.31 (5.5.21 is obsolete in cicleci)

* PHRAS-1304_AUTO-COMPLETION_MASTER
bump php version to 5.5.31 : php.ini moved in circelci

* PHRAS-1304_AUTO-COMPLETION_MASTER
add zmq & date to php for circleci

* PHRAS-1304_AUTO-COMPLETION_MASTER
add zmq

* PHRAS-1304_AUTO-COMPLETION_MASTER
bump amqp

* PHRAS-1304_AUTO-COMPLETION_MASTER
downgrade amqp to 1.2 to test compilation against old librabbit 0.4 (ubuntu)

* PHRAS-1304_AUTO-COMPLETION_MASTER
add amqp.so to php.ini, (re)bump amqp to 1.6

* PHRAS-1304_AUTO-COMPLETION_MASTER
build rabittmq from git

* PHRAS-1304_AUTO-COMPLETION_MASTER
build rabittmq from git again

* PHRAS-1304_AUTO-COMPLETION_MASTER
build rabittmq from git again and again

* PHRAS-1304_AUTO-COMPLETION_MASTER
fix test on media rotation 600*400 -> 400*599 !!!

* PHRAS-1304_AUTO-COMPLETION_MASTER
restore facebook sdk to 4.0.1 due to mistake

* PHRAS-1304_AUTO-COMPLETION_MASTER
deleted unwanted file
2017-02-06 18:26:56 +01:00
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
Mathieu Darse
9d3dfa5653 Manage metadata tags from structure 2015-11-09 19:04:54 +01:00
Mathieu Darse
4424d43b18 Put flags in ES structure 2015-09-28 20:27:29 +02:00
Mathieu Darse
f0dad09f51 Fix « field to highlight » list fetching 2015-08-31 19:12:25 +02:00
Mathieu Darse
af129601e7 Remove unused QueryContext#getRawFields() 2015-07-23 19:03:34 +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
44cb5824e7 Implement private fields on range an equal nodes
New QueryContext::get() method
Removed QueryContext::normalizeField(), can be replaced with get() and a call to
Field::getIndexField().
2015-07-16 20:11:43 +02:00
Mathieu Darse
83d9cd4790 Fix getUnrestrictedFields() when called on non narrowed query context
Add tests and prevent AST to rely on field key by returning indexed arrays
instead of associative ones.
2015-07-16 15:44:16 +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
d778ab5126 Refactor query context
No more private collection map, uses new features from LimitedStructure.
From now on, Context tries to return Field objects instead of strings.

New context methods:
- getUnrestrictedFields()
- getPrivateFields()
- localizeField(Field) (signature changed)
- localizeFieldName(string)

QueryContext::localizeField() now takes a Field object, use localizeFieldName() if you want to pass a string.

Field::getIndexFieldName() renamed to Field::getIndexField().
Raw index fields are now obtained with Field::getIndexField(true).
2015-07-10 17:33:10 +02:00
Mathieu Darse
e4aafaac10 Restrict search on visible private fields
Search on private fields is only supported on bare text search right now (TextNode).
This also fix and issue on databox::get_collection_unique_ids() returning the
value from the first call over and over.
2015-07-03 14:33:48 +02:00
Mathieu Darse
ebbcd3f4dd Restore privateCollectionMap in context & fix tests 2015-07-02 12:10:36 +02:00
Benoît Burnichon
7711d89ad2 Remove privateCollectionMap as not used and make test fail. 2015-06-29 20:28:16 +02:00
Mathieu Darse
6da62a55b3 Fix search options serialization & query context creation 2015-06-29 19:15:52 +02:00
Mathieu Darse
ea8eb4dc07 Fix another IN search regression from 40e2df6c3f
Move getIndexFieldName() from `RecordHelper` to `Field`.
Also remove an unused injected dependency
2015-06-15 19:18:06 +02:00
Mathieu Darse
605c943af5 Fix IN search regression from 40e2df6c3f 2015-06-15 16:13:44 +02:00
Mathieu Darse
40e2df6c3f Search in private fields using new structure features 2015-06-03 19:45:49 +02:00
Mathieu Darse
fcc3f1ba24 Fix range query field 2015-04-15 18:28:12 +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
771aa5b765 Working cross-fields queries with multiple words (without operators)
- Index the full content of a record in a (private_)content_all field
- Handle all fields wide search as a special-case (drastically simplify queries)
- QueryContext doesn't take all allowed fields anymore, but whether private
fields are allowed or not. Since private fields are namespaced, field level
restriction is not needed anymore.
2015-03-24 17:52:30 +01:00
Mathieu Darse
fadf0abd90 Remove QueryContext fields prefixing (only used on term nodes) 2015-03-03 19:02:32 +01: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
387c00cee9 Use QueryException for non existing fields 2015-02-26 13:53:35 +01:00
Mathieu Darse
db766f2865 Handle non existing fields in query 2015-02-25 16:43:25 +01:00
Mathieu Darse
efef09e435 We don't always want to explicitly restrict caption fields 2015-02-25 16:12:39 +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