org.apache.lucene.search
Class Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>

java.lang.Object
  extended by org.apache.lucene.search.Scorer.ScorerVisitor<P,C,S>
Enclosing class:
Scorer

public abstract static class Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
extends Object

A callback to gather information from a scorer and its sub-scorers. Each the top-level scorer as well as each of its sub-scorers are passed to either one of the visit methods depending on their boolean relationship in the query.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
Scorer.ScorerVisitor()
           
 
Method Summary
 void visitOptional(P parent, C child, S scorer)
          Invoked for all optional scorer
 void visitProhibited(P parent, C child, S scorer)
          Invoked for all prohibited scorer
 void visitRequired(P parent, C child, S scorer)
          Invoked for all required scorer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scorer.ScorerVisitor

public Scorer.ScorerVisitor()
Method Detail

visitOptional

public void visitOptional(P parent,
                          C child,
                          S scorer)
Invoked for all optional scorer

Parameters:
parent - the parent query of the child query or null if the child is a top-level query
child - the query of the currently visited scorer
scorer - the current scorer

visitRequired

public void visitRequired(P parent,
                          C child,
                          S scorer)
Invoked for all required scorer

Parameters:
parent - the parent query of the child query or null if the child is a top-level query
child - the query of the currently visited scorer
scorer - the current scorer

visitProhibited

public void visitProhibited(P parent,
                            C child,
                            S scorer)
Invoked for all prohibited scorer

Parameters:
parent - the parent query of the child query or null if the child is a top-level query
child - the query of the currently visited scorer
scorer - the current scorer


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.