Record Class ToolSearchResponse.SearchMetadata
java.lang.Object
java.lang.Record
org.springframework.ai.tool.toolsearch.ToolSearchResponse.SearchMetadata
- Record Components:
searchType- a label identifying theToolIndeximplementation that produced this response — typically the simple class name (e.g."LuceneToolIndex"). Custom implementations may return any non-null, non-empty string.query- the original query string passed to the tool indexsearchTimeMs- elapsed time in milliseconds, ornullif not measured
- Enclosing class:
- ToolSearchResponse
public static record ToolSearchResponse.SearchMetadata(String searchType, String query, @Nullable Long searchTimeMs)
extends Record
Metadata about how a search was performed.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSearchMetadata(String searchType, String query, @Nullable Long searchTimeMs) Creates an instance of aSearchMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.query()Returns the value of thequeryrecord component.@Nullable LongReturns the value of thesearchTimeMsrecord component.Returns the value of thesearchTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SearchMetadata
Creates an instance of aSearchMetadatarecord class.- Parameters:
searchType- the value for thesearchTyperecord componentquery- the value for thequeryrecord componentsearchTimeMs- the value for thesearchTimeMsrecord component
-
-
Method Details
-
builder
-
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). -
searchType
Returns the value of thesearchTyperecord component.- Returns:
- the value of the
searchTyperecord component
-
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
searchTimeMs
Returns the value of thesearchTimeMsrecord component.- Returns:
- the value of the
searchTimeMsrecord component
-