Hazelcast LIKE/ILIKE predicate/query on Integer/Long types

901 Views Asked by At

Is there a way to perform ILIKE/LIKE querying on Integer/Long object attributes in Hazelcast's distributed query?

For eg: In postgres, we can query like,

select * from document where CAST(numOfPages AS TEXT) ilike '%2';

to get the documents with total number of pages ending with 2.

Please help me achieve the same scenario for a hazelcast distributed query.

1

There are 1 best solutions below

2
On BEST ANSWER

Try a value extractor, http://docs.hazelcast.org/docs/3.10.2/manual/html-single/index.html#custom-attributes

This would allow you to return the numeric field as a string, and then you can run LIKE upon it.

Or you could return odd or even, etc