|
Regain 2.1.0-STABLE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SearchResults
Holds the results of one search.
SearchToolkit.getSearchResults(net.sf.regain.util.sharedtag.PageRequest)| Method Summary | |
|---|---|
int |
getDocumentCount()
Gets the number of documents in the in index. |
int |
getHitCount()
Gets the number of hits the search had. |
org.apache.lucene.document.Document |
getHitDocument(int index)
Gets the document of one hit. |
String |
getHitIndexName(int index)
Gets the name of the index a hit comes from. |
float |
getHitScore(int index)
Gets the score of one hit. |
String |
getHitUrl(int index)
Gets the url from a hit and rewrites it according to the rewrite rules specified in the index config. |
boolean |
getOpenHitInNewWindow(int index)
Gets whether a hit should be opened in a new window. |
int |
getSearchTime()
Gets the time the search took in milliseconds. |
boolean |
getShouldHighlight(int index)
Gets whether the search terms should be highlighted |
boolean |
getUseFileToHttpBridgeForHit(int index)
Gets whether the file-to-http-bridge should be used for a certain hit. |
void |
highlightHitDocument(int index)
Highlights fields in the document. |
void |
shortenSummary(int index)
Shortens the summary. |
| Method Detail |
|---|
int getHitCount()
int getDocumentCount()
org.apache.lucene.document.Document getHitDocument(int index)
throws RegainException
index - The index of the hit.
RegainException - If getting the document failed.Document
float getHitScore(int index)
throws RegainException
index - The index of the hit.
RegainException - If getting the score failed.Hits#score(int)
String getHitUrl(int index)
throws RegainException
index - The index of the hit to get the URL for.
RegainException - If getting the hit document failed.
String getHitIndexName(int index)
throws RegainException
index - The index of the hit to get the index name for.
RegainException - If getting the index name failed.
boolean getOpenHitInNewWindow(int index)
throws RegainException
index - The index of the hit.
RegainException - If the hit could not be read.
boolean getUseFileToHttpBridgeForHit(int index)
throws RegainException
Mozilla browsers have a security mechanism that blocks loading file-URLs from pages loaded via http. To be able to load files from the search results, regain offers the file-to-http-bridge that provides all files that are listed in the index via http.
index - The index of the hit.
RegainException - If the hit could not be read.int getSearchTime()
void highlightHitDocument(int index)
throws RegainException
index - The index of the hit.
RegainException - If highlighting failed.Document
boolean getShouldHighlight(int index)
throws RegainException
RegainException - If the value could not read from config
void shortenSummary(int index)
throws RegainException
index - The index of the hit.
RegainException - if shorten fails.
|
Regain 2.1.0-STABLE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||