[ 
http://issues.apache.org/jira/browse/LUCENE-523?page=comments#action_12371011 ] 

Sascha Sadat-Guscheh commented on LUCENE-523:
---------------------------------------------

i run into this problem when using the jackrabbit jcr implementation. any ideas 
for a workaround?

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to