Commit Graph

463 Commits

Author SHA1 Message Date
Benoît Burnichon
8ee5279d58 Remove all uses of databox_field::get_instance 2015-07-08 11:08:07 +02:00
Mathieu Darse
1d0257554b Fix code style on latest query parser feature & add tests 2015-07-02 19:06:44 +02:00
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
ff67120388 Fixup some tests that fails with Elasticsearch. 2015-07-02 12:33:19 +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
Benoît Burnichon
6e651f3b07 Replace app['phraseanet.appbox']->get_databox using trait 2015-07-02 12:27:26 +02:00
Benoît Burnichon
dbb33c85b9 Rename GlobalElasticOptions ElasticsearchOptions 2015-07-02 12:27:25 +02:00
Mathieu Darse
0f7deea610 Fix wrong query context instanciation 2015-07-02 12:25:36 +02:00
Mathieu Darse
1dd2a61338 Fix tests 2015-07-02 12:18:55 +02:00
Mathieu Darse
ebbcd3f4dd Restore privateCollectionMap in context & fix tests 2015-07-02 12:10:36 +02:00
Jean-Yves Gaulier
ce80c4222b PHRAS-482 #time 1m
CS
2015-07-02 11:09:11 +02:00
Jean-Yves Gaulier
d7c3a9943f PHRAS-482 #time 4h
- added "recordid:xxx"
- added "base:yyy" (makes "Base" facets ok)
to query parser
2015-07-01 17:54:32 +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
801314bf59 Fix tests 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
fea47ef5ee Change Elastic Field structure to cope with Collection base_ids 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
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
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
Benoît Burnichon
eeccc7184d Merge branch 'subdef-slow-events' of https://github.com/mdarse/Phraseanet into mdarse-subdef-slow-events 2015-06-23 16:03:55 +02:00
Jean-Yves Gaulier
2ee19c17f5 PHRAS-442 #time 1h
less coupling (mdarse)
2015-06-22 19:07:56 +02:00
Jean-Yves Gaulier
50ddbbed60 PHRAS-442 #time 10 m
cs
2015-06-22 18:20:22 +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
90ae2f2474 PHRAS-454 #time 4h 2015-06-22 17:41:32 +02:00
Jean-Yves Gaulier
7ef8e2c037 wip 2015-06-22 17:41:32 +02:00
jygaulier
e4b5b86d97 Merge pull request #1397 from jygaulier/PHRAS-582_INDEX_REVERSE_ORDER
PHRAS-582 #time 10 m
2015-06-22 14:30:44 +02:00
Mathieu Darse
a74428c8ea Empty indexer queues after flushing to index 2015-06-22 14:09:41 +02:00
Benoît Burnichon
39554459e8 Merge pull request #1406 from mdarse/thesaurus-search-regression
Fix thesaurus regression
2015-06-22 13:38:33 +02:00
Mathieu Darse
418eac8e5a Only create thesaurus filters if needed 2015-06-19 21:53:08 +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
Mathieu Darse
804b5a64a3 Fix type search regression 2015-06-19 21:46:28 +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
Mathieu Darse
605c943af5 Fix IN search regression from 40e2df6c3f 2015-06-15 16:13:44 +02:00
Jean-Yves Gaulier
b21d3ded24 PHRAS-582 #time 10 m
populate : records are indexed from newer to older (rid desc)
2015-06-11 17:56:08 +02:00
Jean-Yves Gaulier
bea0c2a6e6 PHRAS-462 #time 5 h
populate : candidates are written under the good field
2015-06-11 17:31:23 +02:00
Benoît Burnichon
4241fd0e6c WIP with cache 2015-06-10 19:09:38 +02:00
Benoît Burnichon
cd7d8b5d3b Properly clear cache at end of tests. Avoid side-effects on others tests.
Also prevent flushing empty queues as it load mocked configuration
2015-06-09 11:12:01 +02:00
Benoît Burnichon
d0dee9ea2b Delay indexer instantiation, indexer subscriber can be called synchronously or asynchronously 2015-06-05 14:37:50 +02:00
Mathieu Darse
40e2df6c3f Search in private fields using new structure features 2015-06-03 19:45:49 +02:00
Mathieu Darse
89957c1104 Limit facets to searchable fields 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
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