You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ian Rowland (JIRA)" <ji...@apache.org> on 2010/09/29 18:53:45 UTC
[jira] Updated: (SOLR-2130) Empty index directory causes
FileNotFoundException error when starting in-memory SOLR server
(RAMDirectory)
[ https://issues.apache.org/jira/browse/SOLR-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Rowland updated SOLR-2130:
------------------------------
Attachment: TechSpike.zip
The attached file contains a self contained java project that will show the problem.
Run the code in 'Main' (src/highlighting/techspike.solr.highlighting),
The first time it is run the 'index' folder does not exist and the application completes (see output in Console window) .
The second time it runs the 'Index' folder has been created but it empty: this causes the error to occur.
If you delete the index directory and run the app again, it works!
The application uses a RAMDirectory factory that is referenced in the SolrConfig.xml.
The project includes the Solr libraries and they claim to be version 1.4.1!
> Empty index directory causes FileNotFoundException error when starting in-memory SOLR server (RAMDirectory)
> -----------------------------------------------------------------------------------------------------------
>
> Key: SOLR-2130
> URL: https://issues.apache.org/jira/browse/SOLR-2130
> Project: Solr
> Issue Type: Bug
> Components: clients - java
> Affects Versions: 1.4.1
> Environment: Windows XP/Windows 7
> Reporter: Ian Rowland
> Attachments: TechSpike.zip
>
>
> When creating an in-memory Solr Server (using RAMDIrectory) if an empty index directory exists when the server is created the following error occurs:
> java.lang.RuntimeException: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.RAMDirectory@177b093: files:
> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
> The code expects a segment file to be present - but as it is an in-memory server there isn't one to find and the error occurs.
> The workaround is to ensure the directory is deleted before starting the server, but the creation process creates another empty index folder :(
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org