Commit Graph

14 Commits

Author SHA1 Message Date
Benoît Burnichon
7711d89ad2 Remove privateCollectionMap as not used and make test fail. 2015-06-29 20:28:16 +02:00
Mathieu Darse
4157d14d1b Get collections by private fields & filter collections by user rights 2015-06-29 19:15:52 +02:00
Mathieu Darse
801314bf59 Fix tests 2015-06-29 19:15:52 +02:00
Benoît Burnichon
fea47ef5ee Change Elastic Field structure to cope with Collection base_ids 2015-06-29 19:15:52 +02:00
Benoît Burnichon
a0cc568a0c CS fixes 2015-06-29 19:15:43 +02:00
Mathieu Darse
9172da904b Braindump of collection-fields map 2015-06-29 19:13:56 +02:00
Mathieu Darse
a74d0cd7bd Fix thesaurus regression from f25bdf4171
- Field class is now immutable, mergeWith() returns a new instance
- Thesaurus roots are recursively merged
- In case of field merge, Structure class do not index the previous field
- Added failing test case for previous bugs
- Added merge tests on Field class
- Added tests for all indexed stuff inside Structure class
2015-06-19 21:53:08 +02:00
Benoît Burnichon
e1510143a7 Merge pull request #1392 from bburnichon/feature/controller-as-service
Controller as service

PHRAS-529
2015-06-16 11:08:03 +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
Benoît Burnichon
4241fd0e6c WIP with cache 2015-06-10 19:09:38 +02:00
Mathieu Darse
89957c1104 Limit facets to searchable fields 2015-06-03 19:45:49 +02:00
Mathieu Darse
1e4669c122 Test structure more extensively & make isPrivate() throw on invalid field name 2015-06-03 19:45:48 +02:00
Mathieu Darse
52709fb5af More semantic Structure factory 2015-06-03 19:45:48 +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