Commit Graph

885 Commits

Author SHA1 Message Date
Thibaud Fabre
49ec3e0c95 Fix undefined property error 2015-10-12 16:40:28 +02:00
Benoît Burnichon
6ffba52bc4 Merge pull request #1507 from aztech-dev/recovery
Extract password recovery logic in service
2015-10-07 17:50:51 +02:00
Mathieu Darse
d6a82370a9 Merge branch 'master' into ar-731-status-search-dsl
Conflicts:
	lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/RecordIndexer.php
2015-10-06 12:26:03 +02:00
Mathieu Darse
8a5afb1140 Fix public API BC break 2015-10-06 11:22:44 +02:00
Benoît Burnichon
6b6433e404 Change Api version to 2.0.0 2015-09-30 18:12:44 +02:00
Thibaud Fabre
6af2bc902f Pass tests 2015-09-22 17:18:39 +02:00
Jean-Yves Gaulier
cf2d8b6cd2 PHRAS-716 #time 5m
fix test
2015-09-21 17:28:46 +02:00
Nicolas Maillat
15e632b44e Merge pull request #1502 from mdarse/ar-731-status-search-dsl
PHRAS-731 Add status match DSL
2015-09-15 09:22:17 +02:00
Mathieu Darse
8b87e94ff2 Add status match DSL 2015-09-14 19:25:44 +02:00
Mathieu Darse
2afd15dd38 Fix tests 2015-09-08 10:37:32 +02:00
Mathieu Darse
ed0affa921 buildConceptQueriesForFields() replaces buildConceptQueries() 2015-08-27 17:35:34 +02:00
Mathieu Darse
064c5e01a6 Wrap text and concept queries with a single filtered query 2015-08-26 19:29:26 +02:00
Mathieu Darse
e058814638 Test TextNode with private fields and concepts on private fields 2015-08-26 19:29:26 +02:00
Benoît Burnichon
b1bdd73662 Merge pull request #1478 from mdarse/fix-concept-query-builder
Fix concept query builder & private field wrapping
2015-08-26 18:07:58 +02:00
Mathieu Darse
c596914ab9 Fix concept query builder & private field wrapping
Concept queries on private fields where adding a « must » clause to
restrict match on certain collections only. Boolean queries do not
enforce one « should » clause match at least once a « must » clause is
added to it.
To make queries on private fields more robust & performants, these are
now wrapped in a filtered query with a collection filter.
2015-08-26 15:21:02 +02:00
Mathieu Darse
cf01ac94b5 Fix tests 2015-08-24 18:00:14 +02:00
Jean-Yves Gaulier
5d493321fa #PHRAS-622 #time 20m
fix tests
2015-07-29 19:15:52 +02:00
Benoît Burnichon
b558cf9de3 Merge pull request #1452 from mdarse/fix-number-field-search
Fix number field search
2015-07-23 22:11:54 +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
Benoît Burnichon
e0573fc4f6 Merge pull request #1423 from mdarse/private-fields-ast
Restrict search on visible private fields
2015-07-17 17:36:30 +02:00
Mathieu Darse
cc1462a918 Test ThesaurusHelper 2015-07-17 14:59:57 +02:00
Benoît Burnichon
4e1e0bdfaf Merge pull request #1438 from jygaulier/PHRAS-603_del-records-from-story
#PHRAS-602
2015-07-17 10:41:25 +02:00
Mathieu Darse
44cb5824e7 Implement private fields on range an equal nodes
New QueryContext::get() method
Removed QueryContext::normalizeField(), can be replaced with get() and a call to
Field::getIndexField().
2015-07-16 20:11:43 +02:00
Mathieu Darse
419c147982 Fix LimitedCollection::get() & add tests 2015-07-16 18:27:48 +02:00
Jean-Yves Gaulier
c751605554 #PHRAS-602 #time 6h
new : api to delete records from story
2015-07-16 15:52:05 +02:00
Mathieu Darse
83d9cd4790 Fix getUnrestrictedFields() when called on non narrowed query context
Add tests and prevent AST to rely on field key by returning indexed arrays
instead of associative ones.
2015-07-16 15:44:16 +02:00
Benoît Burnichon
a986d20383 Merge pull request #1432 from jygaulier/PHRAS-504_CRLF-in-proposals
PHRAS-504
2015-07-16 11:11:10 +02:00
Jean-Yves Gaulier
0dd2bbfb3c bb changes 2015-07-15 17:08:16 +02:00
Jean-Yves Gaulier
6b21f39d97 fix test 2015-07-15 12:14:30 +02:00
Benoît Burnichon
0820c5692f Remove use of self::$DI[app] and self::$DI[client] in AccountTest 2015-07-15 11:48:18 +02:00
Jean-Yves Gaulier
62f513ec1f bb changes 2015-07-15 11:36:18 +02:00
Benoît Burnichon
08c7382750 Remove use of self::$DI[app] and self::$DI[client] in LightboxTest 2015-07-15 11:36:01 +02:00
Jean-Yves Gaulier
d012978508 PHRAS-504 #time 8h
fix: prod / cr-lf in metadata is ok for aggregate  filter
cr,lf,crlf are normalized
- getting field values from recordadapter
- during es indexation (direct sql read in metadata...)
- before querying
2015-07-15 11:10:38 +02:00
Benoît Burnichon
c97eedd40f Deprecate is_grouping in favor of isStory 2015-07-13 18:14:51 +02:00
Benoît Burnichon
f5949cd9f4 Fix story set metadata collection. 2015-07-13 11:18:12 +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
Benoît Burnichon
5d8e89363e Some PHPCS 2015-07-10 16:32:39 +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
8e6648c512 Add some classes to handle Technical Data 2015-07-10 11:56:17 +02:00
Benoît Burnichon
dd73d6dae2 Renaming of Databox{,Field}Repository 2015-07-08 14:58:41 +02:00
Benoît Burnichon
f3834eb083 Add getFirstDatabox and getClient to PhraseanetTestCase 2015-07-08 11:08:07 +02:00
Benoît Burnichon
8ee5279d58 Remove all uses of databox_field::get_instance 2015-07-08 11:08:07 +02:00
Benoît Burnichon
57ae1ade77 Fixup instability on local testsuite.
Permalink were checked on a non authentified call. So received resources were watermarked.
2015-07-06 17:01:48 +02:00
Mathieu Darse
aa0b40b679 Test TermNode 2015-07-03 20:01:29 +02:00
Mathieu Darse
6b88b7d17b Tests & private fields support on QuotedTextNode 2015-07-03 20:01:20 +02:00
Benoît Burnichon
bfcf254390 Fixup SubdefsTest. Databox could not be stored as subdef modification invalidates it. 2015-07-03 18:20:10 +02:00
Benoît Burnichon
cc7a238e92 Remove an SQL statement in databox, along with cache Key 2015-07-03 18:20:09 +02:00
Benoît Burnichon
62ac0e0cbc Use computed key from appbox. 2015-07-03 18:20:09 +02:00