lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-3470) reorder arguments of Field constructor to be more intuitive
Date Tue, 27 Sep 2011 15:16:11 GMT
reorder arguments of Field constructor to be more intuitive
-----------------------------------------------------------

                 Key: LUCENE-3470
                 URL: https://issues.apache.org/jira/browse/LUCENE-3470
             Project: Lucene - Java
          Issue Type: Task
            Reporter: Robert Muir
             Fix For: 4.0


I think Field should take (name, value, type) not (name, type, value) ?

This seems more intuitive and consistent with previous releases

Take this change to some code I had for example:
{noformat}
-    d1.add(new Field("foo", "bar", Field.Store.YES, Field.Index.ANALYZED));
+    d1.add(new Field("foo", TextField.TYPE_STORED, "bar"));
{noformat}

I think it would be better if it was
{noformat}
document.add(new Field("foo", "bar", TextField.TYPE_STORED));
{noformat}

--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message