lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Isakson (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-523) FSDirectory.openFile(String) causes ClassCastException
Date Fri, 17 Mar 2006 21:00:45 GMT
FSDirectory.openFile(String) causes ClassCastException
------------------------------------------------------

         Key: LUCENE-523
         URL: http://issues.apache.org/jira/browse/LUCENE-523
     Project: Lucene - Java
        Type: Bug
  Components: Store  
    Versions: 1.9, 2.0    
 Environment: Lucene 1.9.1
    Reporter: Eric Isakson


When you call FSDirectory.openFile(String) you get a ClassCastException since FSIndexInput
is not an org.apache.lucene.store.InputStream

The workaround is to reimplement using openInput(String). I personally don't need this to
be fixed but wanted to document it here in case anyone else runs into this for any reason.

The reason I'm calling this is that I have a requirement on my project to create read only
indexes and name the index segments consistently from one build to the next. So, after creating
and optimizing the index, I rename the files and rewrite the segments file. It would be nice
if I had an API that would allow me to say "I only want one segment and I want its name to
be 'foo'". For instance IndexWriter.optimize(String segmentName)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message