Class SearchResultItemImpl<T>
java.lang.Object
org.opencastproject.elasticsearch.impl.SearchResultItemImpl<T>
- All Implemented Interfaces:
Comparable<org.opencastproject.elasticsearch.api.SearchResultItem<T>>,org.opencastproject.elasticsearch.api.SearchResultItem<T>
public class SearchResultItemImpl<T>
extends Object
implements org.opencastproject.elasticsearch.api.SearchResultItem<T>
Default implementation of a
SearchResultItem.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSearchResultItemImpl(double relevance, T source) Creates a new search result item with the given uri. -
Method Summary
Modifier and TypeMethodDescriptionintbooleandoubleReturns the search result's source.inthashCode()voidsetRelevance(double relevance) Sets the relevance value, representing the score in the search result.toString()
-
Field Details
-
source
Source of the search result -
score
protected double scoreScore within the search result
-
-
Constructor Details
-
SearchResultItemImpl
Creates a new search result item with the given uri. Thesourceis the object that created the item, usually, this will be the site itself but it could very well be a module that added to a search result.- Parameters:
relevance- the score inside the search resultsource- the object that produced the result item
-
-
Method Details
-
setRelevance
public void setRelevance(double relevance) Sets the relevance value, representing the score in the search result.- Parameters:
relevance- the relevance value
-
getRelevance
public double getRelevance()- Specified by:
getRelevancein interfaceorg.opencastproject.elasticsearch.api.SearchResultItem<T>- See Also:
-
getSource
Returns the search result's source.- Specified by:
getSourcein interfaceorg.opencastproject.elasticsearch.api.SearchResultItem<T>- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<T>- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-