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/10/13 22:37:11 UTC
[jira] [Created] (LUCENE-3517) Fix pulsingcodec to reuse its enums
Fix pulsingcodec to reuse its enums
-----------------------------------
Key: LUCENE-3517
URL: https://issues.apache.org/jira/browse/LUCENE-3517
Project: Lucene - Java
Issue Type: Improvement
Affects Versions: 4.0
Reporter: Robert Muir
PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
whether terms are pulsed...
we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its enums
Posted by "Robert Muir (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir resolved LUCENE-3517.
---------------------------------
Resolution: Fixed
Fix Version/s: 4.0
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Fix For: 4.0
>
> Attachments: LUCENE-3517.patch, LUCENE-3517.patch, LUCENE-3517.patch, LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its enums
Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3517:
--------------------------------
Attachment: LUCENE-3517.patch
first cut at a patch, all test pass, as well as the TestForTooMuchCloning on LUCENE-3515.
But I would like a review!
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its
enums
Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127671#comment-13127671 ]
Uwe Schindler commented on LUCENE-3517:
---------------------------------------
Attributes policeman sees no problems in the attributes. The rest I don't understand :-)
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3517.patch, LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its enums
Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3517:
--------------------------------
Attachment: LUCENE-3517.patch
added a reuse test for pulsings (fails without patch, creates 7 enums instead of 2)
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3517.patch, LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its
enums
Posted by "Michael McCandless (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127794#comment-13127794 ]
Michael McCandless commented on LUCENE-3517:
--------------------------------------------
Looks great -- +1 to commit!
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3517.patch, LUCENE-3517.patch, LUCENE-3517.patch, LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its enums
Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3517:
--------------------------------
Attachment: LUCENE-3517.patch
ok, i think clear() and copyTo() should be no-ops here.
if someone wraps their custom enum with pulsing, they might have a per-doc attribute and we don't want them clearing away the reuse information.
it also makes no sense to copy this reuse stuff to another docsenum.
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3517.patch, LUCENE-3517.patch, LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its
enums
Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127636#comment-13127636 ]
Robert Muir commented on LUCENE-3517:
-------------------------------------
fyi the stupid purpose of the map is mostly theoretical, in case of Pulsing(Pulsing(Pulsing(Standard)))) or something crazy.
I'm not even sure if this is possible given how pulsing works today... (its too insane to think through)
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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-3517) Fix pulsingcodec to reuse its enums
Posted by "Robert Muir (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3517:
--------------------------------
Attachment: LUCENE-3517.patch
patch with a nested case: Pulsing1(Pulsing2(Standard)).
See the comments in the test, we actually create 4 enums when we could really reuse more. But its 'correct' and I think this is good enough for this crazy case.
> Fix pulsingcodec to reuse its enums
> -----------------------------------
>
> Key: LUCENE-3517
> URL: https://issues.apache.org/jira/browse/LUCENE-3517
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Robert Muir
> Attachments: LUCENE-3517.patch, LUCENE-3517.patch, LUCENE-3517.patch, LUCENE-3517.patch
>
>
> PulsingCodec currently doesnt always reuse its enums, which could lead to behavior like LUCENE-3515.
> The problem is sometimes it returns the 'wrapped' enum, but other times it returns its 'pulsingenum' depending upon
> whether terms are pulsed...
> we can use the fact that these enums allow attributes to keep the reuse information for both so it can reuse when stepping through terms.
--
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