In which case search will be fast


(andavar) #1

Dear ElasticSearchUser,
Please advise me what is the difference between these scenario

  1. client.prepareSearch("indexname").setQuery(QueryBuilders.filteredQuery(qb, fb))

  2. client.prepareSearch("indexname").setQuery(qb).setFilter(fb)

Regards,
LP


(Shay Banon) #2

The filteredQuery option will be faster, the option to set a filter on the
search request is there when facets are used.

On Thu, May 17, 2012 at 3:01 PM, andavar andavar_laxman@rediffmail.comwrote:

Dear ElasticSearchUser,
Please advise me what is the difference between these scenario
*
1.
client.prepareSearch("indexname").setQuery(QueryBuilders.filteredQuery(qb,
fb))

  1. client.prepareSearch("indexname").setQuery(qb).setFilter(fb)*

Regards,
LP

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/In-which-case-search-will-be-fast-tp3999027.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(system) #3