-
1. How to query for multiple fields in infinispan
galder.zamarreno Feb 17, 2011 11:09 AM (in response to cooldude7470)The closest thing we have is the query module: http://community.jboss.org/docs/DOC-14155
-
2. How to query for multiple fields in infinispan
cooldude7470 Feb 18, 2011 10:32 AM (in response to galder.zamarreno)Thanks for replying , i had already seen this page before raising question to the forum. Page explains for one field but what about multiple fields?
I am also trying to find a way to get range of data within cache. Is there any workaround which you can advise ?
Regards,
Khaliq
-
3. Re: How to query for multiple fields in infinispan
sannegrinovero Feb 22, 2011 12:30 PM (in response to cooldude7470)the Query module is an experimental integration of the same engine you can find in Hibernate Search, so you could look in http://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/ for more advanced examples of Querying.
To build a Query, you can use several approaches:
- use the DSL functionality of Search to build one programmatically
- use the Lucene API to build one programmatically (requires some Lucene experience)
- use a Lucene QueryParser
regarding ranges, both via the DSL and via the Lucene API you can create a RangeQuery; if the data in the range has to be interpreted as numbers (as opposing to Strings), then make sure to you @NumericField annotations on your Pojo, or to pad the numbers with leading zeros as they will be compared alfabetically (unless you use the NumericField).
If you only want exact matches, and are not interested in advanced fulltext, similarity, language processing or relevance scoring, then you might want to try the Map/Reduce API instead of the Query module.
http://community.jboss.org/wiki/InfinispanDistributedExecutionFramework