syed
syed

Reputation: 189

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

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.

Upvotes: 0

Views: 950

Answers (1)

Neil Stevenson
Neil Stevenson

Reputation: 3150

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

Upvotes: 1

Related Questions