Open bompi88 opened 11 years ago
I just came across this question, too.
As a workaround, instead of using ProfileIndex.finder.search(query)
, you can do something like this after building your query as usual:
SearchRequestBuilder request = query.getSearchRequestBuilder(IndexUtils
.getInstanceIndex(MyIndexable.class).getIndexPath(), null);
request.addHighlightedField("field1").addHighlightedField("field2");
IndexResults<MyIndexable> indexResults = query.executeSearchRequest(request);
Looks like it's not supported? If anyone know how, please let me know.