-
1. Re: How to stream through query results ?
zhurlik Sep 9, 2019 9:50 AM (in response to jbtrystram) -
2. Re: How to stream through query results ?
jbtrystram Sep 13, 2019 5:38 AM (in response to zhurlik)Thanks !
But this won't change any thing : doing query.list() will still load all the results in memory..
-
3. Re: How to stream through query results ?
zhurlik Sep 15, 2019 2:12 PM (in response to jbtrystram)I didn't check how it works inside, but what I can see that this sample uses a reference to cache and then goes through keys using stream... Probably I am wrong and didn't catch what did you mean
-
4. Re: How to stream through query results ?
william.burns Sep 16, 2019 9:23 AM (in response to jbtrystram)Unfortunately Indexing itself doesn't have a way to delete entries that map to a specific index, without iterating as you have done. If your query returns too many results, you have to use `maxResults` and retrieve them in batches.
The other option is if you can do it is to use distributed streams that Vladimir is referencing. Unfortunately, what you need to do isn't supported as a direct API in a remote cache. Instead you need to use a ServerTask that invokes distributed streams. Once you are in a ServerTask you can do something like I mentioned in How to delete all entries whose values satisfy certain condition
If you need more information on ServerTask you can take a look at Infinispan 9.4 User Guide