org.compass.core.lucene.engine
Class EmptyLuceneSearchEngineHits

java.lang.Object
  extended by org.compass.core.lucene.engine.EmptyLuceneSearchEngineHits
All Implemented Interfaces:
SearchEngineHits, LuceneDelegatedClose, LuceneSearchEngineHits

public class EmptyLuceneSearchEngineHits
extends Object
implements LuceneSearchEngineHits

Author:
kimchy

Constructor Summary
EmptyLuceneSearchEngineHits()
           
 
Method Summary
 void close()
          Closes the hits object.
 Explanation explain(int i)
          Returns Lucene Explanation for hit number i.
 SearchEngineHighlighter getHighlighter()
          Returns an highlighter for the hits.
 Hits getHits()
          Returns the actual Lucene hits.
 int getLength()
          Returns the number of hits.
 Resource getResource(int n)
          Returns that maps to the n'th hit.
 float score(int i)
          Returns the score of the n'th hit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyLuceneSearchEngineHits

public EmptyLuceneSearchEngineHits()
Method Detail

getResource

public Resource getResource(int n)
                     throws SearchEngineException
Description copied from interface: SearchEngineHits
Returns that maps to the n'th hit.

Specified by:
getResource in interface SearchEngineHits
Throws:
SearchEngineException

getLength

public int getLength()
Description copied from interface: SearchEngineHits
Returns the number of hits.

Specified by:
getLength in interface SearchEngineHits

getHighlighter

public SearchEngineHighlighter getHighlighter()
                                       throws SearchEngineException
Description copied from interface: SearchEngineHits
Returns an highlighter for the hits.

Specified by:
getHighlighter in interface SearchEngineHits
Throws:
SearchEngineException

close

public void close()
           throws SearchEngineException
Description copied from interface: SearchEngineHits
Closes the hits object. Note that it is an optional operation since it will be closed transperantly when the transaction is closed.

It is provided for more controlled resource management

Specified by:
close in interface SearchEngineHits
Specified by:
close in interface LuceneDelegatedClose
Throws:
SearchEngineException

score

public float score(int i)
            throws SearchEngineException
Description copied from interface: SearchEngineHits
Returns the score of the n'th hit. Can be a value between 0 and 1, normalised by the highest scoring hit.

Specified by:
score in interface SearchEngineHits
Throws:
SearchEngineException

getHits

public Hits getHits()
Description copied from interface: LuceneSearchEngineHits
Returns the actual Lucene hits.

Specified by:
getHits in interface LuceneSearchEngineHits

explain

public Explanation explain(int i)
                    throws SearchEngineException
Description copied from interface: LuceneSearchEngineHits
Returns Lucene Explanation for hit number i.

Specified by:
explain in interface LuceneSearchEngineHits
Throws:
SearchEngineException


Copyright (c) 2004-2008 The Compass Project.