carrot2/elasticsearch-carrot2 — pull request #7 by kielni (2014-02-24 22:30:25+00:00)
Title: add output_hits param to allow skipping returning search hits 

I've added an output_hits parameter. It defaults to true, which returns both the hits and the clusters as before. If set to false, it returns just the clusters and not the hits.

When clustering lots of results, clustering can take much longer than search. I make one request for search that returns the first page of results very fast. Immediately after the search request, I make a second request for clustering up to 10k documents. This can take several seconds, so I don't want to wait for it to return to display the results. I'm only interested in the clusters, and there's no need to send lots of hits across the network.

I'm using Elasticsearch 0.90.10 in production, so that's why I checked this in here. Let me know if you want me to check it in to a later branch as well.