Commit Graph

22 Commits

Author SHA1 Message Date
Thibaud Fabre
299b24d4fb Update class for mapping type constants 2016-10-19 13:31:17 +02:00
Thibaud Fabre
8fb1cd9944 Coding style and docblocks 2016-10-19 13:29:54 +02:00
Mathieu Darse
4424d43b18 Put flags in ES structure 2015-09-28 20:27:29 +02:00
Mathieu Darse
d26330a17f Fix date validation, range query & equality operator 2015-08-24 11:26:46 +02:00
Mathieu Darse
3569d47467 Fix query builds to only hit compatible fields 2015-07-24 15:28:21 +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
40e2df6c3f Search in private fields using new structure features 2015-06-03 19:45:49 +02:00
Mathieu Darse
421684757a Refactor merged field structure
Here is the new model:

+-----------------------------+
|          Structure          |
+-----------------------------+
| +createFromDataboxes()      |
| getAllFields()              |
| getUnrestrictedFields()     |
| getPrivateFields()          |
| getFacetsFields()           |
| getThesaurusEnabledFields() |
| getDateFields()             |
|- - - - - - - - - - - - - - -|
| add()                       |
| get()                       |
| typeOf()                    |
| isPrivate()                 |
+-------+-+-+-----------------+
        | | |          +---------------------+
        | | +--------> |        Field        |
        | |            +---------------------+
        | |            | getName()           |
        | |            | getType()           |
        | |            | isXXX()             |
        | |            | getThesaurusRoots() |
        | |            +---------------------+
        | |
        | |            +-------+
        | +----------> | Field |
        |              +-------+
        |
        |              +-------+
        +------------> | Field |
                       +-------+

It was driven by the following use cases:
- Get list of facets (only searchable fields)
- Get list of fields with concept inference
- Get list of all fields
    - Splitted in private / public fields (to define mapping)
- Get all date fields
- Get field type
    - To apply sanitization rules
    - To define mapping
- Check if concept inference enabled
- Check if the field is searchable
- Check if the field is a facet
- Check if the field is private
- Dereference field from label (still to be done)

(The last two UCs are new)

Also removed old code from legacy search engines.

[#PHRAS-500]
2015-06-03 19:45:48 +02:00
Mathieu Darse
24bcdba635 Handle field root concepts (prefixes) on indexing 2015-04-29 20:42:51 +02:00
Mathieu Darse
69b64540f7 Prefixes are always an array 2015-04-28 11:26:28 +02:00
Mathieu Darse
c6075fcc1a Thesaurus prefixes in field structure
Also fixes candidates collected from all string fields
2015-04-22 20:46:37 +02:00
Mathieu Darse
033faa1b9a Use mapping type constants 2015-04-15 18:28:12 +02:00
Mathieu Darse
4785fbc8ed Fix indexing issue with date fields
- Date and number types sanitization
- Remove `RecordIndexer` dependency on `ElasticSearchEngine`
- Move some sanitization from `RecordIndexer` to `RecordHelper`
2015-04-15 18:28:12 +02:00
Mathieu Darse
bcff55962c Merge pull request #32 from nlegoff/pr-facets
Add dynamic facets query & take care of ACL for business fields
2015-03-10 12:03:34 +01:00
Nicolas Le Goff
6ddff1923e Fix use stmt 2015-02-27 16:24:19 +01:00
Nicolas Le Goff
4f66588600 Add dynamic facets query 2015-02-26 12:28:22 +01:00
Mathieu Darse
55464f075b Indexable -> Searchable 2015-01-20 18:28: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
Nicolas Le Goff
7cc204f2ba Apply ACL restriction filters for a search query 2014-12-30 19:32:46 +01:00
Damien Alexandre
437f90fd66 Rewrite the way we handle base_id, can now works with more than 1 2014-10-14 14:54:50 +02:00
Damien Alexandre
b15fade0fe Fix the UniqueCollection fetcher 2014-10-07 11:05:14 +02:00
Mathieu Darse
a0b41d54f8 Translate collection identifiers 2014-08-26 19:58:22 +02:00