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

Marvin Humphrey commented on LUCY-184:
--------------------------------------

This behavior is by design.  The alternative to throwing an exception when
attempting to open an index that doesn't exist is silent failure, which would
be bad in the event that someone e.g. misspells the index directory name.

There may be other ways of addressing the issue, such as supplying a routine
to test whether an index exists and allowing the creation of dummy searcher.
If you want to push the issue forward, please send email to the
[developer's list|http://incubator.apache.org/lucy/mailing_lists.html] so that
we can hammer out a design and build consensus.
                
> Exception is thrown when searching an empty index.
> --------------------------------------------------
>
>                 Key: LUCY-184
>                 URL: https://issues.apache.org/jira/browse/LUCY-184
>             Project: Lucy
>          Issue Type: Bug
>    Affects Versions: 0.2.1 (incubating)
>            Reporter: Trygve Laugstøl
>
> It would be very useful if Lucy didn't throw an exception on an empty index.
> {code}
> Uncaught exception from user code:
>       Index doesn't seem to contain any data
>       lucy_IxReader_do_open at 
> /Users/trygvis/.cpan/build/Lucy-0.2.1-ApxzAL/core/Lucy/Index/IndexReader.c 
> line 41
>       at lib/Hackeriet/Links/Index.pm line 118
>         [snipped]
> {code}

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


Reply via email to