Sping data aerospike like query


#1

Hi

When I use sping-data-aerospike like query, it act like startwith query.

The source also like blow at org.springframework.data.aerospike.repository.query.AerospikeQueryCreator

switch (part.getType()) { case AFTER: case GREATER_THAN: op = FilterOperation.GT; break; case GREATER_THAN_EQUAL: op = FilterOperation.GTEQ; break; case BEFORE: case LESS_THAN: op = FilterOperation.LT; break; case LESS_THAN_EQUAL: op = FilterOperation.LTEQ; break; case BETWEEN: op = FilterOperation.BETWEEN; v2 = parameters.next(); break; case LIKE: case STARTING_WITH: op = FilterOperation.START_WITH; break; case ENDING_WITH: op = FilterOperation.ENDS_WITH; break; case CONTAINING: op = FilterOperation.CONTAINING; break; case WITHIN: op = FilterOperation.GEO_WITHIN; v1 = Value.get(String.format("{ “type”: “AeroCircle”, “coordinates”: [[%.8f, %.8f], %f] }", v1, parameters.next(), parameters.next())); break; case SIMPLE_PROPERTY: op = FilterOperation.EQ; break; case NEGATING_SIMPLE_PROPERTY: op = FilterOperation.NOTEQ; break; case IN: op = FilterOperation.IN; break; default: throw new IllegalArgumentException(“Unsupported keyword!”); }

I think “Containing” is more like “like” than “StartWith”.

And when I test, the “Containing” result is the same as “like”'s one.

So it seems that the behavior for “like” should change.


#2

This will be updated with next release.