Chapter 15. The Query Module
15.1. About the Query Module
Users have the ability to query the entire stored data set for specific items in JBoss Data Grid. Applications may not always be aware of specific keys, however different parts of a value can be queried using the Query Module.
The JBoss Data Grid Query Module utilizes the capabilities of Infinispan Query and Apache Lucene to index search objects in the cache. The Query Module uses the Infinispan Query internally and independent of the data source. This allows objects to be located within the cache based on their properties, rather than requiring the keys for each object.
Objects can be searched for based on some of their properties. For example:
- Retrieve all red cars (an exact metadata match).
- Search for all books about a specific topic (full text search and relevance scoring).
An exact data match can also be implemented with the MapReduce function, however full text and relevance based scoring can only be performed via the Query Module.
Warning
The Query Module is in Technical Preview for JBoss Data Grid 6.1. Despite the Query Module itself not being supported, undocumented APIs and packages must not be used in JBoss Data Grid 6.1.