ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "javastuff.sam@gmail.com" <javastuff....@gmail.com>
Subject Re: GET with LIKE operator for keys
Date Fri, 02 Sep 2016 21:57:49 GMT
I want to use same method for multiple caches, so object stored is unknown.
Key type is known and it is String. 

Following is the way I was able to make it working with regular expression
as matchCriteria (.*January.*), Can you please let me know how to use '_key
= %January%' way? and which way would be recommended for this usecase?

private static void scanQueryStringMatch(String cacheName, final String
matchCriteria) {
        IgniteCache cache = Ignition.ignite().cache(cacheName);

        ScanQuery<String, Object> scan = new ScanQuery<>(
                new IgniteBiPredicate<String, Object>() {
                    public boolean apply(String key, Object person) {
                        return key.matches(matchCriteria);
        print("query result : ", cache.query(scan).getAll());

View this message in context: http://apache-ignite-users.70518.x6.nabble.com/GET-with-LIKE-operator-for-keys-tp7381p7491.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message