Hi

It was Ivan who gave the answer. I think in case #2 it will not be cached
since the query that is run first is not cached, so the post filter can't
be cached. If you want it to cache you should use case #3



On Thu, Apr 3, 2014 at 9:32 AM, kidkid <[email protected]> wrote:

> Hi Ryan Chazen,
> Your answer is really clear.
> I just want to know in case #2: setPostFilter(...) wil it cached by
> default ?
> Thanks.
>
>
> On Thursday, February 13, 2014 2:16:41 AM UTC+7, Ryan Chazen wrote:
>>
>> Hey
>>
>> I updated to 1.0.0, but I'm getting a strange issue:
>>
>> As from http://www.elasticsearch.org/guide/en/elasticsearch/client/
>> java-api/current/search.html I tried to run
>>
>> SearchResponse response = client.prepareSearch("index1", "index2")
>>
>>         .setTypes("type1", "type2")
>>
>>         .setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
>>
>>         .setQuery(QueryBuilders.termQuery("multi", "test"))             // 
>> Query
>>
>>         .setFilter(FilterBuilders.rangeFilter("age").from(12).to(18))   // 
>> Filter
>>
>>         .setFrom(0).setSize(60).setExplain(true)
>>
>>         .execute()
>>         .actionGet();
>>
>>
>> But I'm getting "The method setFilter(RangeFilterBuilder) is undefined
>> for the type SearchRequestBuilder"
>> Any idea?
>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "elasticsearch" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elasticsearch/xZGnyTI6lmo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/886826d5-5fe2-4c4c-87d6-d8782535efd0%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/886826d5-5fe2-4c4c-87d6-d8782535efd0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CADawRD1m_oRgW3oWYE5K7s4%3DxvuXyyQCaBpPBCoN5BaJeTWsfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to