"document_id" : "abcdef"
"domain" : "sumitgupta.org"
"url" : "http://www.sumitgupta.org/"
"document_title" : "sumitgupta - -tring to implement sql group by"
"document_text" : "Hello guys how r you"
When searching, I would like to display the results and group the results by domain. So i'm trying to be fair and show 10 different domains in the result rather than showing 10 results from the same domain.
In SQL I could achieve this using the following query:
SELECT * FROM table WHERE document_title LIKE '%sumitgupta%' GROUP BY domain
How could I get a similar GROUP BY results with elasticsearch.
"document_id" : "abcdef"
"domain" : "sumitgupta.org"
"url" : "http://www.sumitgupta.org/"
"document_title" : "sumitgupta - -tring to implement sql group by"
"document_text" : "Hello guys how r you"
When searching, I would like to display the results and group the results by
domain. So i'm trying to be fair and show 10 different domains in the result
rather than showing 10 results from the same domain.
In SQL I could achieve this using the following query:
SELECT * FROM table WHERE document_title LIKE '%sumitgupta%' GROUP BY domain
How could I get a similar GROUP BY results with elasticsearch.
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.