[ https://issues.apache.org/jira/browse/SOLR-3350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252285#comment-13252285 ]
Tommaso Teofili commented on SOLR-3350: --------------------------------------- Hi Robert, For TextField having enablePositionIncrements just set to true and then evaluating an always true condition seems just wrong (code wise) so we should discuss if the issue is either in the true constant or in the code switching on it. It should be clear how a mixed configuration like the one above should result in terms of an "overall" enablePositionIncrements property (true, false, not set) if that's needed in the field type implementation (maybe traversing objects from the QParser to the SchemaField or in some more convenient way, if it exists). Depending on the choice taken on how to fix the code, if a Solr type using TextField has a tokenizer/some filters with enablePositionIncrements set to false then there would be different options: - option 1: it should raise a configuration error - option 2: log a warning message - option 3: don't care (like it is now) > TextField's parseFieldQuery method not using analyzer's enablePosIncr > parameter > ------------------------------------------------------------------------------- > > Key: SOLR-3350 > URL: https://issues.apache.org/jira/browse/SOLR-3350 > Project: Solr > Issue Type: Bug > Components: Schema and Analysis > Affects Versions: 3.5, 4.0 > Reporter: Tommaso Teofili > Priority: Minor > > parseFieldQuery method of TextField class just set > {code} > ... > boolean enablePositionIncrements = true; > ... > {code} > while that should be taken from Analyzer's configuration. > The above condition is evaluated afterwards in two points: > {code} > ... > if (enablePositionIncrements) { > mpq.add((Term[]) multiTerms.toArray(new Term[0]), position); > } else { > mpq.add((Term[]) multiTerms.toArray(new Term[0])); > } > return mpq; > ... > ... > if (enablePositionIncrements) { > position += positionIncrement; > pq.add(new Term(field, term), position); > } else { > pq.add(new Term(field, term)); > } > ... > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org