Package ai.chatur.cortex
Record Class SearchResult
java.lang.Object
java.lang.Record
ai.chatur.cortex.SearchResult
- Record Components:
subject- the identifier of the matching resource within the Cortex namespacematch- the indexed literal that matched the search textscore- the relevance of the match, higher being more relevant
A full-text search hit in the knowledge graph.
Hits are reported once per resource, ranked by descending score. The score is the
relevance the text index assigned to the best-matching literal; it is comparable only within a
single result list, not across searches.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchResult(Term subject, String match, double score) Creates an instance of aSearchResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.match()Returns the value of thematchrecord component.doublescore()Returns the value of thescorerecord component.subject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
subject
Returns the value of thesubjectrecord component.- Returns:
- the value of the
subjectrecord component
-
match
Returns the value of thematchrecord component.- Returns:
- the value of the
matchrecord component
-
score
public double score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-