I'm moving from MySQL to ElasticSearch. I'm loving ElasticSearch's speed and ease of setup, well done!
Using ElasticSearch, I'm creating a database of websites that have the following fields:
document_id (i.e. abc123)
domain (i.e. elasticsearch.org )
url (i.e. http://www.elasticsearch.org/ )
document_title (i.e. elasticsearch - - Open Source, Distributed, RESTful, Search Engine)
document_text (i.e. You know, for Search. So, we build a web site or an app....)
When searching, I would like to display the results (sorted by score) 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. If you search on Google you'll know what I mean.
In SQL I could achieve this using the following query:
SELECT * FROM table WHERE document_title LIKE '%elasticsearch%' GROUP BY domain
How could I get a similar GROUP BY results with elasticsearch.
I'm moving from MySQL to Elasticsearch. I'm loving Elasticsearch's speed and
ease of setup, well done!
Using Elasticsearch, I'm creating a database of websites that have the
following fields:
document_id (i.e. abc123)
domain (i.e. elasticsearch.org )
url (i.e.http://www.elasticsearch.org/)
document_title (i.e. elasticsearch - - Open Source, Distributed, RESTful,
Search Engine)
document_text (i.e. You know, for Search. So, we build a web site or an
app....)
When searching, I would like to display the results (sorted by score) 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.
If you search on Google you'll know what I mean.
In SQL I could achieve this using the following query:
SELECT * FROM table WHERE document_title LIKE '%elasticsearch%' 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.