Commit Graph

100 Commits

Author SHA1 Message Date
Benoît Burnichon
6e52421437 Merge pull request #1390 from mdarse/private-fields-collection-map
Fields « used by » collection map
2015-07-02 12:55:45 +02:00
Benoît Burnichon
d645b92afa Add AclAware Trait 2015-07-02 12:33:18 +02:00
Benoît Burnichon
4880f2bf5a Add getAuthenticator usage
Replace $app['authentication']->getUser() by $app->getAuthenticatedUser()
replace twig app['authentication'].getUser() with corresponding method
2015-07-02 12:33:18 +02:00
Mathieu Darse
0f7deea610 Fix wrong query context instanciation 2015-07-02 12:25: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
4157d14d1b Get collections by private fields & filter collections by user rights 2015-06-29 19:15:52 +02:00
Mathieu Darse
8e45b3872f Fix context create 2015-06-29 19:15:52 +02:00
Benoît Burnichon
acb8ed86c8 Retrieve Collections indexed by field name 2015-06-29 19:15:51 +02:00
Mathieu Darse
9172da904b Braindump of collection-fields map 2015-06-29 19:13:56 +02:00
Benoît Burnichon
041f017fd7 Merge pull request #1395 from jygaulier/PHRAS-442_FACETS-IN-API
PHRAS-442
2015-06-29 17:55:56 +02:00
Benoît Burnichon
28fee99fc4 Add Form for ElasticSearch Configuration.
Also changed type from array to Options object.
2015-06-29 17:10:32 +02:00
Jean-Yves Gaulier
2ee19c17f5 PHRAS-442 #time 1h
less coupling (mdarse)
2015-06-22 19:07:56 +02:00
Jean-Yves Gaulier
1d0dcaa240 PHRAS-442 #time 5h
facets returned in API
"suggestions" returned in API (as flat facets)
2015-06-22 18:20:22 +02:00
Jean-Yves Gaulier
7ef8e2c037 wip 2015-06-22 17:41:32 +02:00
Mathieu Darse
804b5a64a3 Fix type search regression 2015-06-19 21:46:28 +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
b14c845811 Remove remaining calls to getFieldsStructure() 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
Benoît Burnichon
649f0fe510 Refactor can see business fields. 2015-05-29 17:53:45 +02:00
Nicolas Le Goff
2d5a36f5a2 Add highlights query 2015-05-05 11:09:28 +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
Benoît Burnichon
6d4fcbbe9a Refactor SearchEngineController 2015-04-13 17:44:44 +02:00
Benoît Burnichon
7af53aaef4 Merge pull request #1328 from mdarse/qp-ina-oreo
Parsing of INA/OREO queries
2015-03-30 17:53:15 +02:00
Mathieu Darse
171eec6dcb Proper date fields lazy-loading 2015-03-30 17:41:12 +02:00
Mathieu Darse
99e62f7530 QueryParser -> QueryCompiler 2015-03-30 16:17:40 +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
Benoît Burnichon
5d651fc782 Merge pull request #1308 from mdarse/facets-smart-escaping
Smart facet value escaping (the return)
2015-03-19 16:46:44 +01:00
Mathieu Darse
679106d226 Fix typos and check-in Escaper 2015-03-19 16:41:53 +01:00
Benoît Burnichon
8508c81e2d Merge pull request #1305 from mdarse/facets-smart-escaping
Smart facet value escaping
2015-03-19 15:35:57 +01:00
Mathieu Darse
59d2c86a2a Clean ElasticSearchEngine 2015-03-19 13:44:24 +01:00
Mathieu Darse
b1a03ae566 Smart facet value escaping 2015-03-19 13:42:04 +01:00
Mathieu Darse
d766dccfff Remove useless dynamic search dispatch 2015-03-17 19:45:24 +01:00
Mathieu Darse
4419b1b3a7 Refactor facets handling 2015-03-17 19:45:14 +01:00
Mathieu Darse
0ec75c85b3 Add collection facet 2015-03-12 19:47:31 +01:00
Benoît Burnichon
118bb2f03c Some fixup for ES instance 2015-03-11 15:22:20 +01:00
Mathieu Darse
3599b05950 Some tidying / cleanup 2015-03-10 12:02:24 +01:00
Nicolas Le Goff
4f66588600 Add dynamic facets query 2015-02-26 12:28:22 +01:00
Mathieu Darse
a84602f896 Move concept injection into query parser 2015-02-25 16:12:58 +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
fe7e63b3d7 QuotedTextNode don't inherit anymore from TextNode
- Quoted text do not hit the thesaurus anymore
- getTextNodes() was misleading, renamed to getTermNodes()
2015-02-25 12:22:52 +01:00
Nicolas Le Goff
add59cb2f7 Set default sort to relevance if sort option is not provided 2015-02-20 17:27:00 +01:00
Nicolas Le Goff
111755fa9b Refactor status display 2015-02-19 15:14:23 +01:00
Mathieu Darse
47e9605aab Merge pull request #28 from mdarse/reindexing-events
Record lifecycle events and handling
2015-02-19 15:03:43 +01:00
Mathieu Darse
3f440d2184 Throw on legacy search engine indexing requests 2015-02-18 11:55:21 +01:00
Nicolas Le Goff
b4a2796200 Reduce call to ACL's 2015-02-11 20:20:02 +01:00
Nicolas Le Goff
a01bf29c5b Add elasticsearch reindex events 2015-01-26 16:04:23 +01:00
Mathieu Darse
189bdf3402 Merge pull request #13 from nlegoff/fix-sort
Fix elastic search sort query
2015-01-20 18:56:11 +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