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 (Created) (JIRA)" <ji...@apache.org> on 2011/09/27 17:16:11 UTC
[jira] [Created] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
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
[jira] [Commented] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
Posted by "Michael McCandless (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116335#comment-13116335 ]
Michael McCandless commented on LUCENE-3470:
--------------------------------------------
Awesome, thanks Chris!
> 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
> Assignee: Chris Male
> Fix For: 4.0
>
> Attachments: LUCENE-3470.patch
>
>
> 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
[jira] [Commented] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
Posted by "Michael McCandless (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115563#comment-13115563 ]
Michael McCandless commented on LUCENE-3470:
--------------------------------------------
+1, we should minimize the change on upgrade as much as we can.
> 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
[jira] [Resolved] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
Posted by "Chris Male (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Male resolved LUCENE-3470.
--------------------------------
Resolution: Fixed
Committed revision 1176773.
Also updated MIGRATE.txt
> 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
> Assignee: Chris Male
> Fix For: 4.0
>
> Attachments: LUCENE-3470.patch
>
>
> 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
[jira] [Updated] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
Posted by "Chris Male (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Male updated LUCENE-3470:
-------------------------------
Attachment: LUCENE-3470.patch
Patch which reorders the arguments.
> 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
>
> Attachments: LUCENE-3470.patch
>
>
> 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
[jira] [Assigned] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
Posted by "Chris Male (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Male reassigned LUCENE-3470:
----------------------------------
Assignee: Chris Male
> 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
> Assignee: Chris Male
> Fix For: 4.0
>
> Attachments: LUCENE-3470.patch
>
>
> 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
[jira] [Commented] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116190#comment-13116190 ]
Robert Muir commented on LUCENE-3470:
-------------------------------------
ahhh sweet, i'm guessing you have an IDE that does this?
If the tests pass commit, this kinda crap goes out of date too fast!
> 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
> Assignee: Chris Male
> Fix For: 4.0
>
> Attachments: LUCENE-3470.patch
>
>
> 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
[jira] [Commented] (LUCENE-3470) reorder arguments of Field
constructor to be more intuitive
Posted by "Chris Male (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116270#comment-13116270 ]
Chris Male commented on LUCENE-3470:
------------------------------------
Yeah IntelliJ - Change Signature refactor.
> 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
> Assignee: Chris Male
> Fix For: 4.0
>
> Attachments: LUCENE-3470.patch
>
>
> 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