Package org.apache.lucene.search.join
Class ToChildBlockJoinQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.join.ToChildBlockJoinQuery
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ToChildBlockJoinQuery extends org.apache.lucene.search.Query
Just likeToParentBlockJoinQuery
, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.WARNING: to create the parents filter, always use
RawTermFilter
(so that the filter includes deleted docs), wrapped withCachingWrapperFilter
(so that the returned bit set per reader is aFixedBitSet
), specifying DeletesMode.IGNORE (so that on reopen, the filter still includes deleted docs). Failure to do this can result in completely wrong documents being returned! For example:Filter parents = new CachingWrapperFilter( new RawTermFilter(new Term("parent", "yes")), CachingWrapperFilter.DeletesMode.IGNORE);
- See Also:
- Serialized Form
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description ToChildBlockJoinQuery(org.apache.lucene.search.Query parentQuery, org.apache.lucene.search.Filter parentsFilter, boolean doScores)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
org.apache.lucene.search.Weight
createWeight(org.apache.lucene.search.Searcher searcher)
boolean
equals(Object _other)
void
extractTerms(Set<org.apache.lucene.index.Term> terms)
int
hashCode()
org.apache.lucene.search.Query
rewrite(org.apache.lucene.index.IndexReader reader)
String
toString(String field)
-
-
-
Method Detail
-
createWeight
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher) throws IOException
- Overrides:
createWeight
in classorg.apache.lucene.search.Query
- Throws:
IOException
-
extractTerms
public void extractTerms(Set<org.apache.lucene.index.Term> terms)
- Overrides:
extractTerms
in classorg.apache.lucene.search.Query
-
rewrite
public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
- Overrides:
rewrite
in classorg.apache.lucene.search.Query
- Throws:
IOException
-
toString
public String toString(String field)
- Specified by:
toString
in classorg.apache.lucene.search.Query
-
equals
public boolean equals(Object _other)
- Overrides:
equals
in classorg.apache.lucene.search.Query
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classorg.apache.lucene.search.Query
-
clone
public Object clone()
- Overrides:
clone
in classorg.apache.lucene.search.Query
-
-