[jira] [Commented] (LUCENE-5277) Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset
[ https://issues.apache.org/jira/browse/LUCENE-5277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13793594#comment-13793594 ] ASF subversion and git services commented on LUCENE-5277: - Commit 1531627 from [~shaie] in branch 'dev/trunk' [ https://svn.apache.org/r1531627 ] LUCENE-5277: Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset --- Key: LUCENE-5277 URL: https://issues.apache.org/jira/browse/LUCENE-5277 Project: Lucene - Core Issue Type: Improvement Components: core/index Reporter: Shai Erera Assignee: Shai Erera Attachments: LUCENE-5277.patch FixedBitSet copy constructor is redundant the way it is now -- one can call FBS.clone() to achieve that (and indeed, no code in Lucene calls this ctor). I think it will be useful to add a numBits parameter to that method to allow growing/shrinking the new bitset, while copying all relevant bits from the passed one. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5277) Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset
[ https://issues.apache.org/jira/browse/LUCENE-5277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13793596#comment-13793596 ] ASF subversion and git services commented on LUCENE-5277: - Commit 1531630 from [~shaie] in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1531630 ] LUCENE-5277: Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset --- Key: LUCENE-5277 URL: https://issues.apache.org/jira/browse/LUCENE-5277 Project: Lucene - Core Issue Type: Improvement Components: core/index Reporter: Shai Erera Assignee: Shai Erera Attachments: LUCENE-5277.patch FixedBitSet copy constructor is redundant the way it is now -- one can call FBS.clone() to achieve that (and indeed, no code in Lucene calls this ctor). I think it will be useful to add a numBits parameter to that method to allow growing/shrinking the new bitset, while copying all relevant bits from the passed one. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5277) Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset
[ https://issues.apache.org/jira/browse/LUCENE-5277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13792396#comment-13792396 ] Uwe Schindler commented on LUCENE-5277: --- Is there any issue that will use the new ctor? As the current ctor is unused why not simply remove it and leave adding the new one to an issue that really needs it? Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset --- Key: LUCENE-5277 URL: https://issues.apache.org/jira/browse/LUCENE-5277 Project: Lucene - Core Issue Type: Improvement Components: core/index Reporter: Shai Erera Assignee: Shai Erera Attachments: LUCENE-5277.patch FixedBitSet copy constructor is redundant the way it is now -- one can call FBS.clone() to achieve that (and indeed, no code in Lucene calls this ctor). I think it will be useful to add a numBits parameter to that method to allow growing/shrinking the new bitset, while copying all relevant bits from the passed one. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5277) Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset
[ https://issues.apache.org/jira/browse/LUCENE-5277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13793217#comment-13793217 ] Shai Erera commented on LUCENE-5277: I thought of that ... it started in LUCENE-5248 where I want to keep a growable bitset alongside the docs/values arrays to mark whether a document has an updated value or not (following Rob's idea). When I implemented that using OpenBitSet, I discovered the bug and opened LUCENE-5272. As I worked on fixing the bug, I realized OBS has other issues as well and thought that perhaps I can use FixedBitSet, only grow it by copying its array. This is doable even without the ctor, since I can call getBits() and do it like that: {code} FixedBitSet newBits = new FixedBitSet(17); // new capacity System.arraycopy(oldBits.getBits(), 0, newBits.getBits(), 0, oldBits.getBits().length); {code} I then noticed there is a ctor already in FixedBitSet which copies another FBS so I thought just to improve it. It seems more intuitive to do t than let users figure out they can grow a FixedBitSet like above? Modify FixedBitSet copy constructor to take numBits to allow grow/shrink the new bitset --- Key: LUCENE-5277 URL: https://issues.apache.org/jira/browse/LUCENE-5277 Project: Lucene - Core Issue Type: Improvement Components: core/index Reporter: Shai Erera Assignee: Shai Erera Attachments: LUCENE-5277.patch FixedBitSet copy constructor is redundant the way it is now -- one can call FBS.clone() to achieve that (and indeed, no code in Lucene calls this ctor). I think it will be useful to add a numBits parameter to that method to allow growing/shrinking the new bitset, while copying all relevant bits from the passed one. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org