Terrier IR Platform
2.2.1

uk.ac.gla.terrier.querying
Class Manager

java.lang.Object
  extended by uk.ac.gla.terrier.querying.Manager
All Implemented Interfaces:
TermPipeline, TermPipelineAccessor

public class Manager
extends java.lang.Object
implements TermPipeline, TermPipelineAccessor

This class is responsible for handling/co-ordinating the main high-level operations of a query. These are:

  • Pre Processing (Term Pipeline, Control finding, term aggregration)
  • Matching
  • Post-processing @see uk.ac.gla.terrier.querying.PostProcess
  • Post-filtering @see uk.ac.gla.terrier.querying.PostFilter
  • Example usage:
     Manager m = new Manager(index);
     SearchRequest srq = m.newSearchRequest("Q1", "term1 title:term2");
     m.runPreProcessing(srq);
     m.runMatching(srq);
     m.runPostProcess(srq);
     m.runPostFilters(srq);
     

    Properties

    Controls


    Field Summary
    static java.lang.String NAMESPACE_MATCHING
              The default namespace for Matching models to be loaded from
    static java.lang.String NAMESPACE_PIPELINE
              The default namespace for TermPipeline modules to be loaded from
    static java.lang.String NAMESPACE_POSTFILTER
              The default namespace for PostFilters to be loaded from
    static java.lang.String NAMESPACE_POSTPROCESS
              The default namespace for PostProcesses to be loaded from
    static java.lang.String NAMESPACE_WEIGHTING
              The default namespace for Weighting models to be loaded from
     
    Constructor Summary
    Manager()
              Default constructor.
    Manager(Index index)
              Construct a Manager using the specified Index
     
    Method Summary
     Index getIndex()
              Returns the index used by the manager.
     java.lang.String getInfo(SearchRequest srq)
              Returns information about the weighting models and the post processors used for the given search request.
     SearchRequest newSearchRequest()
              Ask for new SearchRequest object to be made.
     SearchRequest newSearchRequest(java.lang.String QueryID)
              Ask for new SearchRequest object to be made.
     SearchRequest newSearchRequest(java.lang.String QueryID, java.lang.String query)
              Ask for new SearchRequest object to be made, instantiated using the specified query id, and that the specified query should be parsed.
     java.lang.String pipelineTerm(java.lang.String t)
              A term pipeline accessor
     void processTerm(java.lang.String t)
              Make this object a term pipeline implementor.
     void runMatching(SearchRequest srq)
              Runs the weighting and matching stage - this the main entry into the rest of the Terrier framework.
     void runPostFilters(SearchRequest srq)
              Runs the PostFilter modules in order added.
     void runPostProcessing(SearchRequest srq)
              Runs the PostProcessing modules in order added.
     void runPreProcessing(SearchRequest srq)
              runPreProcessing
     void setProperties(java.util.Properties p)
              Set all these properties.
     void setProperty(java.lang.String key, java.lang.String value)
              Provide a common interface for changing property values.
     
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    NAMESPACE_POSTPROCESS

    public static final java.lang.String NAMESPACE_POSTPROCESS
    The default namespace for PostProcesses to be loaded from

    See Also:
    Constant Field Values

    NAMESPACE_POSTFILTER

    public static final java.lang.String NAMESPACE_POSTFILTER
    The default namespace for PostFilters to be loaded from

    See Also:
    Constant Field Values

    NAMESPACE_MATCHING

    public static final java.lang.String NAMESPACE_MATCHING
    The default namespace for Matching models to be loaded from

    See Also:
    Constant Field Values

    NAMESPACE_WEIGHTING

    public static final java.lang.String NAMESPACE_WEIGHTING
    The default namespace for Weighting models to be loaded from

    See Also:
    Constant Field Values

    NAMESPACE_PIPELINE

    public static final java.lang.String NAMESPACE_PIPELINE
    The default namespace for TermPipeline modules to be loaded from

    See Also:
    Constant Field Values
    Constructor Detail

    Manager

    public Manager()
    Default constructor. Use the default index

    Since:
    2.0

    Manager

    public Manager(Index index)
    Construct a Manager using the specified Index

    Parameters:
    index - The index to use in this manage
    Method Detail

    processTerm

    public void processTerm(java.lang.String t)
    Make this object a term pipeline implementor.

    Specified by:
    processTerm in interface TermPipeline
    Parameters:
    t - String the term to process.
    See Also:
    TermPipeline

    pipelineTerm

    public java.lang.String pipelineTerm(java.lang.String t)
    A term pipeline accessor

    Specified by:
    pipelineTerm in interface TermPipelineAccessor
    Parameters:
    t - String the term to process.
    Returns:
    String the processed term.

    newSearchRequest

    public SearchRequest newSearchRequest()
    Ask for new SearchRequest object to be made. This is internally a Request object


    newSearchRequest

    public SearchRequest newSearchRequest(java.lang.String QueryID)
    Ask for new SearchRequest object to be made. This is internally a Request object

    Parameters:
    QueryID - The request should be identified by QueryID

    newSearchRequest

    public SearchRequest newSearchRequest(java.lang.String QueryID,
                                          java.lang.String query)
    Ask for new SearchRequest object to be made, instantiated using the specified query id, and that the specified query should be parsed.

    Parameters:
    QueryID - The request should be identified by QueryID
    query - The actual user query
    Returns:
    The fully init'd search request for use in the manager
    Since:
    2.0

    getIndex

    public Index getIndex()
    Returns the index used by the manager. It is used for matching and possibly post-processing.

    Returns:
    Index the index used by the manager.

    setProperty

    public void setProperty(java.lang.String key,
                            java.lang.String value)
    Provide a common interface for changing property values.

    Parameters:
    key - Key of property to set
    value - Value of property to set

    setProperties

    public void setProperties(java.util.Properties p)
    Set all these properties. Implemented using setProperty(String,String).

    Parameters:
    p - All properties to set

    runPreProcessing

    public void runPreProcessing(SearchRequest srq)
    runPreProcessing


    runMatching

    public void runMatching(SearchRequest srq)
    Runs the weighting and matching stage - this the main entry into the rest of the Terrier framework.

    Parameters:
    srq - the current SearchRequest object.

    runPostProcessing

    public void runPostProcessing(SearchRequest srq)
    Runs the PostProcessing modules in order added. PostProcess modules alter the resultset. Examples might be query expansions which completelty replaces the resultset.

    Parameters:
    srq - the current SearchRequest object.

    runPostFilters

    public void runPostFilters(SearchRequest srq)
    Runs the PostFilter modules in order added. PostFilter modules filter the resultset. Examples might be removing results that don't have a hostname ending in the required postfix (site), or document ids that don't match a pattern (scope).

    Parameters:
    srq - the current SearchRequest object.

    getInfo

    public java.lang.String getInfo(SearchRequest srq)
    Returns information about the weighting models and the post processors used for the given search request.

    Parameters:
    srq - the search request for which we obtain the information.
    Returns:
    String information about the weighting models and the post processors used.

    Terrier IR Platform
    2.2.1

    Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow