[
https://issues.apache.org/jira/browse/SOLR-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070001#comment-13070001
]
Robert Muir commented on SOLR-2671:
-----------------------------------
{quote}
isn't that what we do already? at the user friendly level we use the
"omitTermFreqAndPositions" and "termPositions" prroperties – indexOptions() is
only used by FieldType at the last possible moment.
{quote}
Not really: currently the xml files have two properties, but the Solr APIs
expose indexOptions(), which it then sets on the lucene Field when it makes it.
Alternatively, the Solr APIs could have two booleans, or a real class or
something like that so that nobody ever "sees" indexOptions unless they
interact with a lucene Field.
The reason i didn't do this initially is because with two booleans and the
crazy implication between them, its easy to introduce bugs (as seen by the
buggy verification check in SOLR-2669 !)... Plus it forced me to review all
usages of the booleans in the current code that uses the SchemaField, versus
adding an additional one (which might create bugs where something should be
considering the new case but didnt)
> SchemaField.indexOptions() should return null if SchemaField.indexed()
> returns false
> ------------------------------------------------------------------------------------
>
> Key: SOLR-2671
> URL: https://issues.apache.org/jira/browse/SOLR-2671
> Project: Solr
> Issue Type: Improvement
> Reporter: Hoss Man
> Fix For: 3.4, 4.0
>
>
> It doesn't make sense for SchemaField.indexOptions() to return any of the
> values from the IndexOptions enum if the field is not going to be indexed at
> all.
> we should return null to prevent missleading any code that calls that method
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]