|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.impl.AbstractCompassHits
org.compass.core.impl.DefaultCompassHits
public class DefaultCompassHits
| Constructor Summary | |
|---|---|
DefaultCompassHits(SearchEngineHits hits,
InternalCompassSession session,
CompassQuery query)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the hits object. |
Object |
data(int n)
Returns the object that maps the n'th hit |
CompassDetachedHits |
detach()
Detaches a seperate CompassHits, holds all the data. |
CompassDetachedHits |
detach(int from,
int size)
Detaches a seperate CompassHits, which starts from the
given from parameter, and has the specified size. |
int |
getLength()
Returns the number of hits, |
CompassQuery |
getQuery()
Retrurn the query that resulted in this search hits. |
SearchEngineHits |
getSearchEngineHits()
|
CompassQuery |
getSuggestedQuery()
Returns a suggested query (based on spell check). |
CompassHighlightedText |
highlightedText(int n)
Returns a cached highlighted text the maps to the n'th hit. |
CompassHighlighter |
highlighter(int n)
Returns the highlighter that maps the n'th hit. |
CompassHit |
hit(int n)
Returns a compass hit wrapper that maps to the n'th hit |
Resource |
resource(int n)
Returns the resource that maps to the n'th hit |
float |
score(int n)
Returns the score of the n'th hit. |
void |
setHighlightedText(int n,
String propertyName,
String highlihgtedText)
|
| Methods inherited from class org.compass.core.impl.AbstractCompassHits |
|---|
iterator, length |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.compass.core.CompassHitsOperations |
|---|
length |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Constructor Detail |
|---|
public DefaultCompassHits(SearchEngineHits hits,
InternalCompassSession session,
CompassQuery query)
| Method Detail |
|---|
public SearchEngineHits getSearchEngineHits()
getSearchEngineHits in interface InternalCompassHits
public CompassHit hit(int n)
throws CompassException
CompassHitsOperations
hit in interface CompassHitsOperationsn - The n'th hit.
CompassException
public Object data(int n)
throws CompassException
CompassHitsOperations
data in interface CompassHitsOperationsn - The n'th hit.
CompassException
public Resource resource(int n)
throws CompassException
CompassHitsOperations
resource in interface CompassHitsOperationsn - The n'th hit.
CompassExceptionpublic CompassQuery getQuery()
CompassHitsOperations
getQuery in interface CompassHitsOperationspublic CompassQuery getSuggestedQuery()
CompassHitsOperations
getSuggestedQuery in interface CompassHitsOperationsCompassQuery.getSuggestedQuery()public int getLength()
CompassHitsOperations
getLength in interface CompassHitsOperations
public float score(int n)
throws CompassException
CompassHitsOperations
score in interface CompassHitsOperationsn - The n'th hit.
CompassException
public CompassHighlighter highlighter(int n)
throws CompassException
CompassHitsString)
will be cached within the hits (and also moved to the detached hits, if
CompassHits.detach(int, int) is called), and can be used by
CompassHitsOperations.highlightedText(int).
highlighter in interface CompassHitsn - The n'th hit.
CompassException
public CompassDetachedHits detach()
throws CompassException
CompassHitsCompassHits, holds all the data. The
detached hits preloads all the data, so it can be used outside of a
transaction. NOTE: Be carefull when using the method, since it will take
LONG time to load a large hits result set.
detach in interface CompassHitsCompassException
public CompassDetachedHits detach(int from,
int size)
throws CompassException,
IllegalArgumentException
CompassHitsCompassHits, which starts from the
given from parameter, and has the specified size. The detached hits
preloads all the data, so it can be used outside of a transaction.
detach in interface CompassHitsfrom - The index that the sub hits starts from.size - The size of the sub hits.
CompassException
IllegalArgumentException
public CompassHighlightedText highlightedText(int n)
throws CompassException
CompassHitsOperationsCompassHighlighter
using CompassHits.highlighter(int).
highlightedText in interface CompassHitsOperationsn - The n'th hit
CompassException
public void setHighlightedText(int n,
String propertyName,
String highlihgtedText)
setHighlightedText in interface InternalCompassHits
public void close()
throws CompassException
CompassHits
close in interface CompassHitsCompassException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||