Commit Graph

52 Commits

Author SHA1 Message Date
jygaulier
3eb2fd6688 PHRAS-3389_use-only-conceptpaths-from-selected-dbs_MASTER
fix : fixed "query_parsing_exception: [_na] query malformed, must start with start_object"
2021-04-13 10:59:56 +02:00
jygaulier
63bee24775 PHRAS-3389_use-only-conceptpaths-from-selected-dbs_MASTER
fix : search only concept-paths from the relevant thesaurus
fix : search only fields from the relevant databoxes (collections)
2021-04-08 18:15:27 +02:00
jygaulier
cfd385498d - add : cache on es "tags"
- removed : variable globalstructure construction (WITH_FIELDS, WITH_FLAGS...) (was unused)
- cleanup (stopwatches etc)
2020-11-05 19:54:14 +01:00
jygaulier
5ae105d9c2 - fix : error during populate
- add : clear structure cache when structure (field or sb) is changed
2020-11-05 11:27:39 +01:00
jygaulier
4d961e2dbe - fix : added cache to es "globalstructure" construction 2020-11-04 11:35:36 +01:00
jygaulier
e36b0785ee - add some simple cache
- disable check of conf/searchengine/type
- faster construction of concept-paths
- pass strucure to es as factory (useless, to be reverted)
- add stopwatch (log into file, disabled for now)
2020-10-30 11:00:17 +01:00
Jean-Yves Gaulier
20839f1dd7 return facets following the order defined in conf. 2020-02-17 20:17:08 +01:00
Jean-Yves Gaulier
cba5f8a1a2 PHRAS-2815_generate-cterms-multi-db_4.1
fix : the "generate cterms" setting is applied by db
how : the "global_structure" (fields merged) now also contains field settings by db
2019-11-07 17:24:57 +01:00
Jean-Yves Gaulier
b4e848a5e9 PHRAS-2808-2806_disable-cterms_mask-writable-fields_4.1
new : checkbox in admin/field to allow gui (prod) editing, default=checked.
rename "publish_cterms" to "generate_cterms"
todo : implement "gui_editable" in edit ux (hide field when =false)
todo : 2 new strings (ckbox labels) to trans
2019-10-31 19:31:12 +01:00
Jean-Yves Gaulier
ce13112105 PHRAS-2808_disable-cterms_4.1
new : checkbox in admin/field to disable cterms generation.
fix : when cterms is cleared (during reindex), rejected terms are kept
WIP
2019-10-31 18:12:26 +01:00
aynsix
20076df3f8 port to 4.1 date with time on phraseanet 2019-08-15 15:23:03 +04:00
aina-esokia
eaf8cf076a port to 4.1 search mix type 2019-03-22 12:04:42 +04:00
aina-esokia
d2bdd2ed4a port 4.1: migrate field type text to string 2019-01-11 14:45:33 +04:00
Sandeep
3c9e875ea9 PHRAS-1911 refactor technical fields list 2018-03-19 15:00:21 +04:00
Sandeep
5de988299d PHRAS-1911-add route return list documentary fields 2018-03-16 15:01:20 +04:00
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
f79a78e4c5 Restore merge exceptions and add structure factory method 2016-10-19 13:31:17 +02:00
Thibaud Fabre
299b24d4fb Update class for mapping type constants 2016-10-19 13:31:17 +02:00
Thibaud Fabre
f2cfe93f8c Finish refactoring mapping creation 2016-10-19 13:29:54 +02:00
Thibaud Fabre
c2f0a5a184 Remove check on facet count 2016-10-19 13:29:53 +02:00
Thibaud Fabre
11d25021cc CS fixes 2016-10-19 06:51:37 +02:00
Benoît Burnichon
57aab7aa85 Fixup PHPCS 2016-03-15 17:47:13 +01:00
Mathieu Darse
fe63511031 Rename index metadata prefix 2015-11-13 10:28:57 +01:00
Mathieu Darse
8e5d09bd76 Test value compatibility before creating ES query 2015-11-10 16:40:10 +01:00
Mathieu Darse
9d3dfa5653 Manage metadata tags from structure 2015-11-09 19:04:54 +01:00
Mathieu Darse
8a5afb1140 Fix public API BC break 2015-10-06 11:22:44 +02:00
Mathieu Darse
4424d43b18 Put flags in ES structure 2015-09-28 20:27:29 +02:00
Benoît Burnichon
065084818b Merge pull request #1474 from mdarse/facet-values-size-wording
Simpler facet handling in ES structure
2015-08-26 18:06:09 +02:00
Mathieu Darse
7e8a4a53a3 Simpler facet handling in ES structure
- Single property for facet settings in Field, we can’t have a limit
with disabled faceting.
- Fixes bug when fields having incompatible limit but are still merged together.
- Use constants for special limit values (i.e. no limit)
2015-08-24 16:07:53 +02:00
Mathieu Darse
d26330a17f Fix date validation, range query & equality operator 2015-08-24 11:26:46 +02:00
Jean-Yves Gaulier
72bb1877a7 #PHRAS-668 #time 1d
- fix: facets number (admin/field) is now used by prod.
- add: query/es : removed useless & pack clauses on status masks -> shortest (fastest ?) query
2015-08-20 11:08:55 +02:00
Mathieu Darse
3569d47467 Fix query builds to only hit compatible fields 2015-07-24 15:28:21 +02:00
Mathieu Darse
a59c42980c Fix facets on non string fields & fix raw with "in" query 2015-07-23 18:41:10 +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
419c147982 Fix LimitedCollection::get() & add tests 2015-07-16 18:27:48 +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
929705f13e Structure -> GlobalStructure + LimitedStructure
Rename Structure to GlobalStructure.
Add new LimitedStructure to wrap another Structure and transparently restrict
access on private fields.
2015-07-10 12:30:13 +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
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