-
1. Re: Datatype support and complexity of Infinispan Queries
sannegrinovero Sep 26, 2013 6:15 AM (in response to lokeshbandaru)1 of 1 people found this helpfulLucene used by Infinispan is completely a text based search which does not allow querying over objects like bytearrays(blobs)
Is there a way to get around this in Infinispan?
I might be able to help but didn't fully understand what you want to do. Could you make an example?
Second, how will we be able to query for objects with conditions involving only the object's attributes but not any external values.
Instead of a query like "Get all objects where ObjectA.AttrA == 1234", will something like "Get all objects where ObjectA.AttrA==ObjectA.AttrB" be possible?
Yes that's possible but requires a little bit of coding, as it's considered an uncommon requirement. You can solve such more advanced queries by coding a custom Lucene filter, than the Infinispan Query API allows you to apply any Apache Lucene native filter directly on the query execution.
-
2. Re: Datatype support and complexity of Infinispan Queries
lokeshbandaru Sep 26, 2013 8:09 AM (in response to sannegrinovero)Thanks for the reply Sanne.
The first point was about search on byte-array types.
If attrA in ObjectA is a byte-array type, then can there be a search like "objectA.attrA equals/matches <some byte array>" ?
Will try to look into the second one for the native lucene query invocation via Infinispan.
Regards.
-
3. Re: Datatype support and complexity of Infinispan Queries
lokeshbandaru Oct 8, 2013 5:08 AM (in response to lokeshbandaru)Sanne, could you kindly let know if a query like the one pasted above is possible with byte-array types?
Thanks.
-
4. Re: Datatype support and complexity of Infinispan Queries
sannegrinovero Oct 8, 2013 6:19 AM (in response to lokeshbandaru)Yes that can be done, but you'll have to annotate the "attrA" property with a FieldBridge.
See also: http://docs.jboss.org/hibernate/search/4.4/reference/en-US/html_single/#example-field-bridge
-
5. Re: Datatype support and complexity of Infinispan Queries
lokeshbandaru Oct 8, 2013 6:26 AM (in response to sannegrinovero)Yes. Missed that one completely. Sorry for the bother. My bad.
Thank you so much Sanne.
Was trying for the other one(pure attribute based search) but rather unsuccessfuly. Will continue to.