Description
PHP query:
array( 'filter' => new Criterion\LogicalAnd( array( new Criterion\ContentId( array( 1, 4, 10 ) ), new Criterion\LogicalNot( new Criterion\ContentId( array( 10, 12 ) ) ), ) ), ),
will generate following Solr query:
((id:"1" OR id:"4" OR id:"10") AND NOT ((id:"10" OR id:"12")))
That will work as expected. However, PHP query:
array( 'filter' => new Criterion\LogicalAnd( array( new Criterion\ContentId( array( 1, 4, 10 ) ), new Criterion\LogicalAnd( array( new Criterion\LogicalNot( new Criterion\ContentId( array( 10, 12 ) ) ), ) ), ) ), ),
will create following Solr query:
((id:"1" OR id:"4" OR id:"10") AND (NOT ((id:"10" OR id:"12"))))
Which will not work as expected. Reason for this is that LogicalNot now produces pure negative subquery, which will not match anything.
Proposed fix:
make LogicalNot always produce positive query, for example:
((id:"1" OR id:"4" OR id:"10") AND (*:* NOT ((id:"10" OR id:"12"))))
Attachments
Issue Links
- discovered while testing
-
EZP-22799 Configure Solr Storage engine in Symfony service container
- Closed