Package sk.iway.iwcm.rag.search
Record Class MarkdownSearchService.SearchResult
java.lang.Object
java.lang.Record
sk.iway.iwcm.rag.search.MarkdownSearchService.SearchResult
- Record Components:
title- source heading or relative path fallbackurl- viewer URL, ornullfor filesystem sourcessourcePath- full logical path including the configured rootsnippet- bounded Markdown excerpt from the best matching chunk, retaining line breaks and indentationscore- best chunk rerank score when available, otherwise its retrieval score
- Enclosing class:
- MarkdownSearchService
public static record MarkdownSearchService.SearchResult(String title, String url, String sourcePath, String snippet, Double score)
extends Record
Represents one documentation source returned to a search client.
-
Constructor Summary
Constructors -
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.score()Returns the value of thescorerecord component.snippet()Returns the value of thesnippetrecord component.Returns the value of thesourcePathrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
SearchResult
Creates an instance of aSearchResultrecord class.- Parameters:
title- the value for thetitlerecord componenturl- the value for theurlrecord componentsourcePath- the value for thesourcePathrecord componentsnippet- the value for thesnippetrecord componentscore- the value for thescorerecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
sourcePath
Returns the value of thesourcePathrecord component.- Returns:
- the value of the
sourcePathrecord component
-
snippet
Returns the value of thesnippetrecord component.- Returns:
- the value of the
snippetrecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-