|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.gouv.culture.sdx.search.lucene.query.ResultDocuments
The documents which form an ordered list of search results. This class allows one to manage the sorting effectively, because only the requests which require a sorting other than the relevance are actually sorted.
Constructor Summary | |
ResultDocuments()
Creates a ResultDocuments object A logger must be set and then this object must be setUp. |
Method Summary | |
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
Sets the logger. |
ResultDocument |
getDocument(int i)
Returns a document according to its index in the list. |
ResultDocument[] |
getDocuments()
Returns all of the result documents. |
int |
getLength()
Returns the number of results. |
float |
getMaxScore()
Returns the relevance ranking of the first document; therefore, the highest ranking is returned. |
void |
setSortedResults(ResultDocument[] sr)
Sets the sorted results. |
void |
setUp(org.apache.lucene.search.Hits h)
Builds a list of result documents from Lucene results. |
void |
setUp(ResultDocument[] sr)
Builds a list of result documents from an array or sorted ResultDocuments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ResultDocuments()
A logger must be set and then this object must be setUp.
enableLogging(org.apache.avalon.framework.logger.Logger)
,
setUp(org.apache.lucene.search.Hits)
Method Detail |
public void setUp(org.apache.lucene.search.Hits h)
h
- The Lucene results.public void setUp(ResultDocument[] sr)
sr
- The sorted results.public void setSortedResults(ResultDocument[] sr)
sr
- The sorted results.public int getLength()
public float getMaxScore() throws SDXException, java.io.IOException
SDXException
java.io.IOException
public ResultDocument getDocument(int i) throws SDXException
i
- The index of the desired document.
SDXException
public ResultDocument[] getDocuments() throws SDXException
SDXException
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging
in interface org.apache.avalon.framework.logger.LogEnabled
logger
- The logger.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |