Hello all,
This is my first time mailing this list, so please let me know if this is not the right
place for this.
I use a replicated and/or distributed cache to store some Objects and it is indexed using
Infinispan's indexing via Hibernate Search. I'm using Infinispan 7.1.x.
I wanted to use Lucene's GroupingSearch functionality, which I could not find anywhere
in the Infinispan or Hibernate Search docs, so I used this:
https://docs.jboss.org/infinispan/7.1/apidocs/org/infinispan/query/Search...
I wrote code like so:
SearchIntegrator searchIntegrator = Search.getSearchManager(cache).getSearchFactory();
IndexReader reader = searchIntegrator.getIndexReaderAccessor().open(ENTITY_CLASSES);
IndexSearcher searcher = new IndexSearcher(reader);
String groupedBy = ...;
GroupingSearch groupingSearch = new GroupingSearch(groupedBy);
TopGroups<BytesRef> result = groupingSearch.search(searcher, query, offset, limit);
I noticed in the javadocs for the getSearchFactory method that it's deprecated (maybe
just in Infinispan 7.0?). So I wanted to ask:
1. Is there are better way to perform a grouping search?
2. Will this API be available in future Infinispan versions?
I personally think access to an IndexReader is very helpful for those strange edge cases
to run custom Lucene queries.
Thanks,
--
Ray Douglass