You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/07/23 10:45:09 UTC
[jira] [Commented] (SOLR-2671) SchemaField.indexOptions() should
return null if SchemaField.indexed() returns false
[ https://issues.apache.org/jira/browse/SOLR-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069920#comment-13069920 ]
Robert Muir commented on SOLR-2671:
-----------------------------------
I think this is ok, but:
* I don't think we should pass null to the lucene Field (its not a valid value for the enum).
e.g. the part that creates the field shouldn't do:
f.setOmitNorms(omitNorms);
f.setIndexOptions(options);
f.setBoost(boost);
but instead if (options != null) { f.setIndexOptions(...) }
* Speaking of omitNorms and Boost, I don't think we should set indexOptions to null, unless we do the same with these consistently.
So if indexOptions will be null in the non-indexed case, then boost should become Float and omitNorms Boolean, and these should be null too.
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org