public class LuceneSearchResult<E> extends Object implements SearchResult<E>, Serializable
SearchResult implementation that additionally provides scores.| Modifier and Type | Class and Description |
|---|---|
static class |
LuceneSearchResult.HitSet |
| Constructor and Description |
|---|
LuceneSearchResult(List<E> items,
List<Float> scores,
int requestedStart,
int requestedCount,
int totalCount) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCount()
Get the number of elements contained in this search elements.
|
Facet |
getFacet(String field) |
Set<Facet> |
getFacets() |
int |
getRequestedCount()
Gets specified result count.
|
int |
getRequestedStart()
Gets specified start index.
|
List<E> |
getResult()
Get the result elements of the search.
|
List<Float> |
getScores()
The n-th float in this list is the score for the n-th element in the
search result. |
int |
getTotalCount()
Get the total number of elements that meet the search conditions, not considering
getRequestedCount(). |
boolean |
isMaxHitsExceeded() |
static void |
setMaxHitsThreshold(int maxHitsThreshold)
Sets the maximum number of Hits which shall be available.
|
String |
toString() |
public static void setMaxHitsThreshold(int maxHitsThreshold)
maxHitsThreshold - public boolean isMaxHitsExceeded()
public int getCount()
getCount in interface SearchResult<E>getTotalCount()public int getRequestedCount()
SearchResultgetRequestedCount in interface SearchResult<E>public int getRequestedStart()
SearchResultgetRequestedStart in interface SearchResult<E>public List<E> getResult()
getResult in interface SearchResult<E>Itemspublic List<Float> getScores()
search result.Floatvaluespublic int getTotalCount()
getRequestedCount().getTotalCount in interface SearchResult<E>getCount()Copyright © 2017 SAP SE. All Rights Reserved.