Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9368

FileDictionaryFactory does not treat lines beginning with '#' as comments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Bug
    • 6.1
    • None
    • Suggester
    • None

    Description

      The documentation for FileDictionaryFactory states that "Blank lines and lines that start with a '#' are ignored". This is not the case. When loading a dictionary file with '#' prefixed lines, they just get interpreted as terms and show up in suggestion results.

      This causes additional confusion when trying to use payloads. As stated in https://lucene.apache.org/core/6_1_0/suggest/org/apache/lucene/search/suggest/FileDictionary.html : "In order to have payload enabled, the first entry has to have a payload". However, if you happen to have a "comment" as the first line in a dictionary file (that doesn't happen to have two instances of the fieldDelimiter in it...), payloads are disabled.

      Attachments

        Activity

          People

            Unassigned Unassigned
            john.iacona John Iacona
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: