Class Suggest.Suggestion.Entry<O extends Suggest.Suggestion.Entry.Option>

    • Constructor Detail

      • Entry

        public Entry​(Text text,
                     int offset,
                     int length)
      • Entry

        protected Entry()
      • Entry

        public Entry​(StreamInput in)
              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • addOption

        public void addOption​(O option)
      • addOptions

        protected void addOptions​(java.util.List<O> options)
      • sort

        protected void sort​(java.util.Comparator<O> comparator)
      • getText

        public Text getText()
        Returns:
        the text (analyzed by suggest analyzer) originating from the suggest text. Usually this is a single term.
      • getOffset

        public int getOffset()
        Returns:
        the start offset (not analyzed) for this entry in the suggest text.
      • getLength

        public int getLength()
        Returns:
        the length (not analyzed) for this entry in the suggest text.
      • getOptions

        public java.util.List<O> getOptions()
        Returns:
        The suggested options for this particular suggest entry. If there are no suggested terms then an empty list is returned.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • newOption

        protected abstract O newOption​(StreamInput in)
                                throws java.io.IOException
        Throws:
        java.io.IOException