|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CompassHits
Holds hits returned from a search performed by compass. Can be used within a
transaction context. For hits to be used outside of a transactional context,
the detach() and detach(int, int) can be used.
highlighter(int), and any highlighting
operation (that returns a single String) will be cached within the
hits (and also moved to the detached hits, if detach(int, int) is called),
and can be used by CompassHitsOperations.highlightedText(int).
| Method Summary | |
|---|---|
void |
close()
Closes the hits object. |
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. |
CompassHighlighter |
highlighter(int n)
Returns the highlighter that maps the n'th hit. |
| Methods inherited from interface org.compass.core.CompassHitsOperations |
|---|
data, getLength, getQuery, getSuggestedQuery, highlightedText, hit, length, resource, score |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
CompassDetachedHits detach()
throws CompassException
CompassHits, 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.
CompassException
CompassDetachedHits detach(int from,
int size)
throws CompassException,
IllegalArgumentException
CompassHits, 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.
from - The index that the sub hits starts from.size - The size of the sub hits.
CompassException
IllegalArgumentException
CompassHighlighter highlighter(int n)
throws CompassException
String)
will be cached within the hits (and also moved to the detached hits, if
detach(int, int) is called), and can be used by
CompassHitsOperations.highlightedText(int).
n - The n'th hit.
CompassException
void close()
throws CompassException
CompassException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||