Skip to content

Commit

Permalink
Forgot to cut over the child filter in nested filter to use fixed bit…
Browse files Browse the repository at this point in the history
…set cache.
  • Loading branch information
martijnvg committed Oct 31, 2014
1 parent f6b37a3 commit 1645434
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -30,6 +30,7 @@
import org.elasticsearch.common.lucene.search.XFilteredQuery;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.cache.filter.support.CacheKeyFilter;
import org.elasticsearch.index.cache.fixedbitset.FixedBitSetFilter;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.object.ObjectMapper;
import org.elasticsearch.index.search.nested.NonNestedDocsFilter;
Expand Down Expand Up @@ -130,7 +131,7 @@ public Filter parse(QueryParseContext parseContext) throws IOException, QueryPar
throw new QueryParsingException(parseContext.index(), "[nested] nested object under path [" + path + "] is not of nested type");
}

Filter childFilter = parseContext.cacheFilter(objectMapper.nestedTypeFilter(), null);
FixedBitSetFilter childFilter = parseContext.fixedBitSetFilter(objectMapper.nestedTypeFilter());
usAsParentFilter.filter = childFilter;
// wrap the child query to only work on the nested path type
query = new XFilteredQuery(query, childFilter);
Expand Down

0 comments on commit 1645434

Please sign in to comment.