You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Martijn van Groningen (JIRA)" <ji...@apache.org> on 2011/08/16 19:43:27 UTC

[jira] [Created] (LUCENE-3377) TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException

TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException
-------------------------------------------------------------

                 Key: LUCENE-3377
                 URL: https://issues.apache.org/jira/browse/LUCENE-3377
             Project: Lucene - Java
          Issue Type: Bug
            Reporter: Martijn van Groningen
            Priority: Minor


TermOrdsIterator's lookup method thows ArrayIndexOutOfBoundsException if reuse argument is reused acros segments. 

--
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


[jira] [Commented] (LUCENE-3377) TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086259#comment-13086259 ] 

Michael McCandless commented on LUCENE-3377:
--------------------------------------------

I think we should record which IR instance the DTO.TermOrdsIterator was created on, and then don't reuse the passed instance if it came from a different IR?

Actually we should probably just hold onto & compare the IR.getCoreCacheKey().

> TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException
> -------------------------------------------------------------
>
>                 Key: LUCENE-3377
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3377
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Martijn van Groningen
>            Priority: Minor
>
> TermOrdsIterator's lookup method can throw an ArrayIndexOutOfBoundsException if reuse argument is reused acros segments. 
> Example collector:
> {code}
> private DocTermOrds.TermOrdsIterator reuse = null;
> public void collect(int doc) throws IOException {
>     ...
>     reuse = docTermOrds.lookup(doc, reuse);
>     ...
> }
> public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException {
>     docTermOrds = FieldCache.DEFAULT.getDocTermOrds(context.reader, field);
>     ....
> }
> {code}
> If reuse argument is always null exception doesn't occur. 

--
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


[jira] [Updated] (LUCENE-3377) TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException

Posted by "Martijn van Groningen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-3377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn van Groningen updated LUCENE-3377:
------------------------------------------

          Description: 
TermOrdsIterator's lookup method can throw an ArrayIndexOutOfBoundsException if reuse argument is reused acros segments. 

Example collector:
{code}
private DocTermOrds.TermOrdsIterator reuse = null;

public void collect(int doc) throws IOException {
    ...
    reuse = docTermOrds.lookup(doc, reuse);
    ...
}

public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException {
    docTermOrds = FieldCache.DEFAULT.getDocTermOrds(context.reader, field);
    ....
}
{code}
If reuse argument is always null exception doesn't occur. 

  was:TermOrdsIterator's lookup method thows ArrayIndexOutOfBoundsException if reuse argument is reused acros segments. 

    Affects Version/s: 4.0

> TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException
> -------------------------------------------------------------
>
>                 Key: LUCENE-3377
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3377
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Martijn van Groningen
>            Priority: Minor
>
> TermOrdsIterator's lookup method can throw an ArrayIndexOutOfBoundsException if reuse argument is reused acros segments. 
> Example collector:
> {code}
> private DocTermOrds.TermOrdsIterator reuse = null;
> public void collect(int doc) throws IOException {
>     ...
>     reuse = docTermOrds.lookup(doc, reuse);
>     ...
> }
> public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException {
>     docTermOrds = FieldCache.DEFAULT.getDocTermOrds(context.reader, field);
>     ....
> }
> {code}
> If reuse argument is always null exception doesn't occur. 

--
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


[jira] [Commented] (LUCENE-3377) TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException

Posted by "Martijn van Groningen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086269#comment-13086269 ] 

Martijn van Groningen commented on LUCENE-3377:
-----------------------------------------------

bq. Actually we should probably just hold onto & compare the IR.getCoreCacheKey().
Seems like a good idea to me.

> TermOrdsIterator#lookup throws ArrayIndexOutOfBoundsException
> -------------------------------------------------------------
>
>                 Key: LUCENE-3377
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3377
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Martijn van Groningen
>            Priority: Minor
>
> TermOrdsIterator's lookup method can throw an ArrayIndexOutOfBoundsException if reuse argument is reused acros segments. 
> Example collector:
> {code}
> private DocTermOrds.TermOrdsIterator reuse = null;
> public void collect(int doc) throws IOException {
>     ...
>     reuse = docTermOrds.lookup(doc, reuse);
>     ...
> }
> public void setNextReader(IndexReader.AtomicReaderContext context) throws IOException {
>     docTermOrds = FieldCache.DEFAULT.getDocTermOrds(context.reader, field);
>     ....
> }
> {code}
> If reuse argument is always null exception doesn't occur. 

--
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