org.apache.lucene.search

Class MultiSearcher

Implemented Interfaces:
java.rmi.Remote, Searchable
Known Direct Subclasses:
ParallelMultiSearcher

public class MultiSearcher
extends Searcher

Implements search over a set of Searchables.

Applications usually need only call the inherited search(Query) or search(Query,Filter) methods.

Constructor Summary

MultiSearcher(Searchable[] searchables)
Creates a searcher which searches searchables.

Method Summary

void
close()
Document
doc(int n)
int
docFreq(Term term)
Explanation
explain(Query query, int doc)
protected int[]
getStarts()
int
maxDoc()
Query
rewrite(Query original)
TopDocs
search(Query query, Filter filter, int nDocs)
TopFieldDocs
search(Query query, Filter filter, int n, Sort sort)
void
search(Query query, Filter filter, HitCollector results)
int
searcherIndex(int n)
Deprecated.
int
subDoc(int n)
Returns the document number of document n within its sub-index.
int
subSearcher(int n)
Returns index of the searcher for document n in the array used to construct this searcher.

Methods inherited from class org.apache.lucene.search.Searcher

getSimilarity, search, search, search, search, search, setSimilarity

Constructor Details

MultiSearcher

public MultiSearcher(Searchable[] searchables)
            throws IOException
Creates a searcher which searches searchables.

Method Details

close

public void close()
            throws IOException
Specified by:
close in interface Searchable

doc

public Document doc(int n)
            throws IOException
Specified by:
doc in interface Searchable

docFreq

public int docFreq(Term term)
            throws IOException
Specified by:
docFreq in interface Searchable

explain

public Explanation explain(Query query,
                           int doc)
            throws IOException
Specified by:
explain in interface Searchable

getStarts

protected int[] getStarts()

maxDoc

public int maxDoc()
            throws IOException
Specified by:
maxDoc in interface Searchable

rewrite

public Query rewrite(Query original)
            throws IOException
Specified by:
rewrite in interface Searchable

search

public TopDocs search(Query query,
                      Filter filter,
                      int nDocs)
            throws IOException
Specified by:
search in interface Searchable

search

public TopFieldDocs search(Query query,
                           Filter filter,
                           int n,
                           Sort sort)
            throws IOException
Specified by:
search in interface Searchable

search

public void search(Query query,
                   Filter filter,
                   HitCollector results)
            throws IOException
Specified by:
search in interface Searchable

searcherIndex

public int searcherIndex(int n)

Deprecated.


subDoc

public int subDoc(int n)
Returns the document number of document n within its sub-index.

subSearcher

public int subSearcher(int n)
Returns index of the searcher for document n in the array used to construct this searcher.

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