Class SearchHit

java.lang.Object
com.codename1.backend.search.SearchHit

public final class SearchHit extends Object
One matching document.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SearchHit(String id, double score, Map document, Map highlights)
    A hit with its id, score, stored document and highlights (field to a list of fragments; may be empty).
  • Method Summary

    Modifier and Type
    Method
    Description
    The stored document.
    Field name to a List of fragments with the matches in <em>; empty unless highlights were asked for and the engine supports them.
    The document's id.
    double
    The engine's relevance score; comparable only within one result.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SearchHit

      public SearchHit(String id, double score, Map document, Map highlights)
      A hit with its id, score, stored document and highlights (field to a list of fragments; may be empty).
  • Method Details

    • getId

      public String getId()
      The document's id.
    • getScore

      public double getScore()
      The engine's relevance score; comparable only within one result.
    • getDocument

      public Map getDocument()
      The stored document.
    • getHighlights

      public Map getHighlights()
      Field name to a List of fragments with the matches in <em>; empty unless highlights were asked for and the engine supports them.