Re: How to do wildcard search by key in ignite?

2020-01-31 Thread Ilya Kasnacheev
Hello! If you like, you can use meaningful bits from the first two characters of your key to form a partition id. You will need to inherit from RendezvousAffinityFunction to do that. In this case, you can just scan one partition (out of e.g. 1024). However, this may pose a problem if data is

Re: How to do wildcard search by key in ignite?

2020-01-31 Thread Pavel Tupitsyn
Another possibility is full-text search, which provides indexed search with wildcards: https://apacheignite.readme.io/v1.1/docs/cache-queries#text-queries On Fri, Jan 31, 2020 at 2:29 PM Stephen Darlington < stephen.darling...@gridgain.com> wrote: > If you don’t use SQL, Ignite is basically a

Re: How to do wildcard search by key in ignite?

2020-01-31 Thread Stephen Darlington
If you don’t use SQL, Ignite is basically a key-value store. That is, if you don’t know the key you have to look at every record to see if it matches. You can specify a filter on the ScanQuery: ScanQuery q = new ScanQuery<>((k,v) -> k.equals("Stephen")); That wouldn’t be indexed, though. If

Re: How to do wildcard search by key in ignite?

2020-01-30 Thread Tunas
Sorry, I have not provided full information or not able to understand your answer as i am newbie. I am storing my keys and values as string. For e.g. Key "ABC"+"id" value : serialized object in string form. My objects/entities has no sql attributed like "QuerySqlField" and its not possible

Re: How to do wildcard search by key in ignite?

2020-01-30 Thread Stephen Darlington
If you create an index on (A,B,C), SQL queries for all three variants you note should work and use the index. Having said that, “returning a huge number of rows” doesn’t seem like a good usage pattern with Ignite. You might be better distributing your query around the cluster rather than

How to do wildcard search by key in ignite?

2020-01-30 Thread Tunas
I have key composed of "A"+"B"+"C"+Id. I want to do search by "ABC*" or"AB*" or "A*". Require very efficient query as i am fetching huge number of rows from cache based on above query. Also my values are serialized customize big user objects? -- Sent from: