lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3439) add checks/asserts if you search across a closed reader
Date Thu, 15 Sep 2011 20:29:09 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105665#comment-13105665
] 

Robert Muir commented on LUCENE-3439:
-------------------------------------

{quote}
IR/IW already try to do this
{quote}

I don't think so? I'll attach a patch with a trivial test basically demonstrating what I was
seeing.

It sometimes passes!!!!!

{noformat}
  public void test() throws Exception {
    TermRangeQuery query = TermRangeQuery.newStringRange("field", "a", "z", true, true);
    searcher.search(query, 5);
    searcher.close();
    reader.close();
    searcher.search(query, 5); // are you serious? 
  }
{noformat}

> add checks/asserts if you search across a closed reader
> -------------------------------------------------------
>
>                 Key: LUCENE-3439
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3439
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> if you try to search across a closed reader (and/or searcher too),
> there are no checks, not even assertions statements.
> this results in crazy scary stacktraces deep inside places like FSTs/various term dictionary
implementations etc.
> In some situations, depending on codec, you wont even get an error (i'm sure its fun
when you try to retrieve the stored fields!)

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


Mime
View raw message