You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2013/01/01 02:07:21 UTC

[jira] [Commented] (SOLR-656) better error message when "data/index" is completely empty

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

Hoss Man commented on SOLR-656:
-------------------------------

Shawn: thanks for looking into this, but i'm not sure any changes are really needed anymore.

At the time i created this issue, you would get a really ugly and confusing error message if you stoped solr, ran "rm dataDir/index/*" and left the index directory empty, and then restarted solr.

it appears that at some point in the past 5 years, the underlying behavior of lucene has changed, such that an "empty" Directory is now acceptable, and that same behavior works fine -- solr/lucene happily adds new segments file to the empty directory on startup and you can start indexing documents.

So unless you're seeing some error i'm not (maybe this only works cleanly with the default DirectoryFactory?) i think we can resolve this as not a problem
                
> better error message when "data/index" is completely empty
> ----------------------------------------------------------
>
>                 Key: SOLR-656
>                 URL: https://issues.apache.org/jira/browse/SOLR-656
>             Project: Solr
>          Issue Type: Wish
>            Reporter: Hoss Man
>             Fix For: 4.2, 5.0
>
>         Attachments: SOLR-656.patch, SOLR-656-rmdir.patch, SOLR-656-rmdir.patch
>
>
> Solr's normal behavior is to create an "index" dire in the dataDir if one does not already exist, but if "index" does exist it is used as is, warts and all ... if the index is corrupt in some way, and Solr can't create an IndexWriter or IndexReader that error is propagated up to the user.
> I don't think this should change: Solr shouldn't attempt to do anything special if there is a low level problem with the index, but something that i've seen happen more then a few times is that people unwittingly "rm index/*" when they should "run -r index" and as a result Solr+Lucene gives them an error instead of just giving them an empty index
> when checking if an existing index dir exists, it would probably be worth while to add a little one line sanity test that it contains some files, and log a warning.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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