Class SearchResultsEvent

java.lang.Object
ai.vectros.types.SearchResultsEvent

public final class SearchResultsEvent extends Object
  • Method Details

    • getEvent

      public SearchResultsEventEvent getEvent()
      Returns:
      Backward-compatible alias of type. Always search_results.
    • getResults

      public List<RagSearchResult> getResults()
      Returns:
      The ranked results used to ground the model's answer. An empty array means nothing matched.
    • getTotalResults

      public int getTotalResults()
      Returns:
      The total number of matches found, which may exceed the number of results returned when a result limit is applied.
    • getSearchTimeMs

      public long getSearchTimeMs()
      Returns:
      Wall-clock duration of the retrieval step, in milliseconds.
    • getDegraded

      public Optional<Boolean> getDegraded()
      Returns:
      True when one search backend was unavailable and these results came from the remaining engine only (for example, keyword search degraded to semantic-only during an outage). The grounding context may be less complete in this case.
    • getDegradedLegs

      public Optional<List<String>> getDegradedLegs()
      Returns:
      Which retrieval legs were unavailable: text (keyword) and/or vector (semantic). Empty when retrieval was not degraded.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static SearchResultsEvent.EventStage builder()