[
https://issues.apache.org/jira/browse/SOLR-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070000#comment-13070000
]
Hoss Man commented on SOLR-2671:
--------------------------------
{quote}
bq. better docs on IndexOptions / AbstractField about null not being a valid
value for IndexOptions (unless i've convinced you that it should be)
I don't think we should do any of this.
This thing is totally expert, and labeled as such.
{quote}
Fair enough -- it's expert and used at a low level so you don't want to spend
cycles on an explicit null check ... but i don't really understand why you are
opposed to adding *docs* to the (public) AbstractField.setIndexOptions that say
null is not allowed and that the value of the enum is meaningless/unused unless
the field is indexed.
bq. If we want the Solr SchemaField stuff to use something more friendly, then
it shouldn't use this IndexOptions enum at all, and instead use its own system
internally and convert to it at the last minute.
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.
That's my point about adding direct accessors for those properties (so code has
a "friendly" way of getting the values of those props w/o deciphering the
IndexOptions object)
> 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]