[ 
https://issues.apache.org/jira/browse/SOLR-9368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403886#comment-15403886
 ] 

Jan Høydahl commented on SOLR-9368:
-----------------------------------

FileDictionary.java does not mention the support for comment lines and does not 
implement it either. So the easiest is to treat this as a documentation bug in 
the RefGuide: 
https://cwiki.apache.org/confluence/display/solr/Suggester#Suggester-FileDictionaryFactory
 and change that.

If not, this should be changed into a LUCENE issue for code changes, but then 
it must be a feature request and not a Bug, since the Lucene documentation 
(Javadoc) is fully in line with the code...

> FileDictionaryFactory does not treat lines beginning with '#' as comments
> -------------------------------------------------------------------------
>
>                 Key: SOLR-9368
>                 URL: https://issues.apache.org/jira/browse/SOLR-9368
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Suggester
>    Affects Versions: 6.1
>            Reporter: John Iacona
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to