Class VespaBackend

java.lang.Object
com.yahoo.prelude.fastsearch.VespaBackend
Direct Known Subclasses:
IndexedBackend, StreamingBackend

public abstract class VespaBackend extends Object
Superclass for backend searchers.
Author:
baldersheim
  • Field Details

    • SORTABLE_ATTRIBUTES_SUMMARY_CLASS

      public static final String SORTABLE_ATTRIBUTES_SUMMARY_CLASS
      for vespa-internal use only; consider renaming the summary class
      See Also:
  • Constructor Details

    • VespaBackend

      protected VespaBackend(ClusterParams clusterParams)
  • Method Details

    • getName

      public final String getName()
    • getDefaultDocsumClass

      protected final String getDefaultDocsumClass()
    • doSearch2

      protected abstract Result doSearch2(String schema, Query query)
      Searches a search cluster This is an endpoint - searchers will never propagate the search to any nested searcher.
      Parameters:
      query - the query to search
    • doPartialFill

      protected abstract void doPartialFill(Result result, String summaryClass)
    • summaryNeedsQuery

      public boolean summaryNeedsQuery(Query query)
      Returns whether we need to send the query when fetching summaries. This is necessary if the query requests summary features or dynamic snippeting.
    • getServerId

      public String getServerId()
    • getDocumentDatabase

      public DocumentDatabase getDocumentDatabase(Query query)
    • transformQuery

      protected void transformQuery(Query query)
    • search

      public Result search(String schema, Query query)
    • fill

      public void fill(Result result, String summaryClass)
    • ensureLegalSummaryClass

      protected String ensureLegalSummaryClass(Query query, String summaryClass)
    • fillHits

      protected VespaBackend.FillHitsResult fillHits(Result result, DocsumPacket[] packets, String summaryClass)
      Fills the hits.
      Returns:
      the number of hits that we did not return data for, and an optional error message. when things are working normally we return 0.
    • shutDown

      public void shutDown()