|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.gouv.culture.sdx.utils.SdxObjectImpl
fr.gouv.culture.sdx.search.lucene.query.Results
The results of a search. This object also contains information on the search acceptRequest used to obtain them.
| Field Summary | |
static int |
HITS_PER_PAGE
The default number of results per page |
| Fields inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
encoding, logger |
| Constructor Summary | |
Results()
Creates a Results object A logger must be set and then this object must be setUp. |
|
| Method Summary | |
int |
count()
Returns the number of results. |
int |
countPages()
Counts and returns the number of pages for these results. |
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
Sets the logger. |
java.lang.String[] |
getDocIds()
Returns the document id for each document of the result set. |
TermHighlighter |
getHighliter()
|
org.apache.lucene.search.Hits |
getHits()
|
int |
getHitsPerPage()
Get the number of hits per page. |
float |
getMaxScore()
Returns the score of the first document, which is always the highest score. |
void |
getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
int docNo)
Returns a representation XML of information on the preceding and following documents. |
void |
getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
java.lang.String id)
Returns a representation XML of information on the preceding and following documents. |
Query |
getQuery()
Returns the search acceptRequest which created these results. |
void |
getQueryAsSAX(org.xml.sax.ContentHandler hdl)
Returns an XML representation of the Query. |
SearchLocations |
getSearchLocations()
Retourne tous les r�sultats sous la forme d'un �l�ment DOM. |
void |
reSort(SortSpecification sorts)
Resorts the results with a sort specification. |
void |
setAllHits()
Indicates that all the results should be returned . |
void |
setHighliter(TermHighlighter hliter)
|
void |
setHitsPerPage(int nb)
Set the number of hits per page. |
void |
setId(java.lang.String id)
Sets the identification number of this acceptRequest for a given session. |
void |
setUp(SearchLocations sLocs,
org.apache.lucene.search.Hits searchHits,
Query query)
Builds the results of a acceptRequest from the Lucene results. |
void |
setUp(SearchLocations sLocs,
org.apache.lucene.search.Hits searchHits,
SortSpecification sorts,
Query query)
Builds the results of a acceptRequest from the Lucene results and a sort specification. |
void |
toSAX(org.xml.sax.ContentHandler hdl)
Returns an XML representation of the results. |
void |
toSAX(org.xml.sax.ContentHandler hdl,
boolean getDocuments)
Returns an XML representation of the results. |
void |
toSAX(org.xml.sax.ContentHandler hdl,
int pageNo)
Returns an XML representation of the results. |
void |
toSAX(org.xml.sax.ContentHandler hdl,
int pageNo,
boolean getDocuments)
Returns an XML representation of the results. |
| Methods inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
getChildLogger, setEncoding |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject |
setEncoding |
| Field Detail |
public static final int HITS_PER_PAGE
| Constructor Detail |
public Results()
A logger must be set and then this object must be setUp.
enableLogging(org.apache.avalon.framework.logger.Logger),
setUp(fr.gouv.culture.sdx.search.lucene.query.SearchLocations, org.apache.lucene.search.Hits, fr.gouv.culture.sdx.search.lucene.query.SortSpecification, fr.gouv.culture.sdx.search.lucene.query.Query)| Method Detail |
public void setUp(SearchLocations sLocs,
org.apache.lucene.search.Hits searchHits,
SortSpecification sorts,
Query query)
throws SDXException,
java.io.IOException
sLocs - The SearchLocations object (indices searched).searchHits - Les r�sultats Lucene.sorts - Les sp�cifications de tri.query - La requ�te qui a permis d'obtenir ces r�sultats.
SDXException
java.io.IOException
public void setUp(SearchLocations sLocs,
org.apache.lucene.search.Hits searchHits,
Query query)
throws SDXException
sLocs - The SearchLocations object (indices searched).searchHits - Les résultats Lucene.query - La requ�te qui a permis d'obtenir ces r�sultats.
SDXExceptionpublic SearchLocations getSearchLocations()
public org.apache.lucene.search.Hits getHits()
public void toSAX(org.xml.sax.ContentHandler hdl)
throws org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException
toSAX in interface org.apache.cocoon.xml.XMLizablehdl - The ContentHandler to feed with events.
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
public void toSAX(org.xml.sax.ContentHandler hdl,
boolean getDocuments)
throws SDXException,
java.lang.Exception
hdl - The ContentHandler to feed with events.getDocuments - Indicates if the actual complete documents should be returned
SDXException
java.lang.Exception
public void toSAX(org.xml.sax.ContentHandler hdl,
int pageNo)
throws SDXException,
java.lang.Exception
hdl - The ContentHandler to feed with events.pageNo - The page number of the desired results.
SDXException
java.lang.Exception
public void toSAX(org.xml.sax.ContentHandler hdl,
int pageNo,
boolean getDocuments)
throws SDXException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException
hdl - The ContentHandler to feed with events.pageNo - The requested page number of the desired results. Reaffected when number of results doesn't fit.getDocuments - Indicates if the actual complete documents should be returned
SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingExceptionpublic int countPages()
public void setAllHits()
public void setHitsPerPage(int nb)
nb - The number of hits.public int getHitsPerPage()
public void setId(java.lang.String id)
id - The id.
public void getQueryAsSAX(org.xml.sax.ContentHandler hdl)
throws SDXException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException
hdl - The ContentHandler to feed with events.
SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
public java.lang.String[] getDocIds()
throws SDXException,
java.io.IOException
SDXException
java.io.IOExceptionpublic Query getQuery()
public void getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
int docNo)
throws SDXException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException,
java.io.IOException
docNo - The 1-based index of the document in the sorted resultshdl - The ContentHandler which will receive the events
SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
java.io.IOException
public void getNavigationAsSAX(org.xml.sax.ContentHandler hdl,
java.lang.String id)
throws SDXException,
org.xml.sax.SAXException,
org.apache.cocoon.ProcessingException,
java.io.IOException
hdl - The ContentHandler which will receive the eventsid - The id of the document
SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
java.io.IOException
public void reSort(SortSpecification sorts)
throws java.io.IOException,
SDXException
sorts - The sort specification.
java.io.IOException
SDXExceptionpublic int count()
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging in interface org.apache.avalon.framework.logger.LogEnabledenableLogging in class SdxObjectImpllogger - The logger.public float getMaxScore()
public TermHighlighter getHighliter()
public void setHighliter(TermHighlighter hliter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||