snowdrop / spring-data-snowdrop

Spring Data implementation for Hibernate Search, JPA (full-text), Infinispan, GAE, ...
Apache License 2.0
5 stars 4 forks source link

Check the implementation of NOT in derived queries #11

Closed yrodiere closed 6 years ago

yrodiere commented 6 years ago

First problem: me.snowdrop.data.hibernatesearch.core.query.CriteriaConverter#convert implements "must not" as queryBuilder.not(queryBuilder.all(mustNotQueryList)), but queryBuilder.not(queryBuilder.any(mustNotQueryList)) seems to be more appropriate.

Second problem: me.snowdrop.data.hibernatesearch.core.query.Criteria#not is never used, which might indicate either dead code or an unimplemented feature.

alesj commented 6 years ago

For the 1st -- we need a test. (you are probably right, as I changed that code, and I guess I missed the all->any detail)

Wrt 2nd -- I would leave it there, it might come in handy one day.

alesj commented 6 years ago

https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/main/java/org/springframework/data/elasticsearch/core/CriteriaQueryProcessor.java#L96:L98

alesj commented 6 years ago

Fixed.

yrodiere commented 6 years ago

@alesj Are you sure? I don't see any relevant commit...