Package ai.chatur.cortex.spring
Record Class CortexProperties.Search
java.lang.Object
java.lang.Record
ai.chatur.cortex.spring.CortexProperties.Search
- Record Components:
viewHalfLife- how long it takes a view's contribution to that weight to halve, so recent interest counts for more than interest that has since faded. Set to0to disable decay entirely and weight by the raw lifetime view count instead — in which case a resource popular long ago outranks a newer one indefinitely. Changing this takes effect immediately; no stored history is rewritten.
- Enclosing class:
CortexProperties
Settings for full-text search ranking.
Search results are ranked by textual relevance, then weighted by how often each resource has been deliberately opened, so a frequently consulted resource outranks an equally relevant one nobody reads. That weight is bounded, so popularity reorders comparable results rather than overriding relevance.
-
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.final StringtoString()Returns a string representation of this record class.Returns the value of theviewHalfLiferecord component.
-
Constructor Details
-
Search
Creates an instance of aSearchrecord class.- Parameters:
viewHalfLife- the value for theviewHalfLiferecord 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). -
viewHalfLife
Returns the value of theviewHalfLiferecord component.- Returns:
- the value of the
viewHalfLiferecord component
-