Lets say I have two indices region and theme. Both of the indices have a field name and both indexed a String named Vienna.
At the moment if I search for Vienna I get both results. But in a new requirement I need to show just the region result (or hide the theme result) if the search Term (or the result) is thesame in region and theme.
Is there any way to do that? If you need more information please let me know.
Thanks in advance.
I now I can have some business logic on my result. But I search for a solution for the query. Do you now if this is possible and which "technique" I need to use for the query?
SearchResponse searchResponse = client.search(searchRequest);
SearchHits hits = searchResponse.getHits();
SearchHit[] searchHits = hits.getHits();
for (SearchHit hit : searchHits) {
System.out.println(hit.getIndex()
}
based on (hit.getIndex()) you can restrict
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.