Class WordAssociation

  • All Implemented Interfaces:
    QueryStringTerm

    public class WordAssociation
    extends Object
    implements QueryStringTerm
    A term that is associated with other terms (e.g. synonyms). They all will be searched together each one as an optional replacement for the actual word.
    • Method Detail

      • putOrUpdate

        public void putOrUpdate​(WeightedWord newWord)
      • toQueryString

        public String toQueryString()
        builds a query like
         (a OR "aa"^0.8 OR "aaa"^0.7)
         
        using the related words. Related words are always quoted to prevent analysis.
        Specified by:
        toQueryString in interface QueryStringTerm
        Returns:
        term in query-string-query format.
      • getWord

        public String getWord()
        Specified by:
        getWord in interface QueryStringTerm
        Returns:
        the single original word without the additional noise.