[
https://issues.apache.org/jira/browse/LUCENE-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Naber closed LUCENE-523.
-------------------------------
Resolution: Fixed
openFile had been deprecated in Lucene 1.9 and then later removed, so I'm
closing this issue.
> FSDirectory.openFile(String) causes ClassCastException
> ------------------------------------------------------
>
> Key: LUCENE-523
> URL: https://issues.apache.org/jira/browse/LUCENE-523
> Project: Lucene - Java
> Issue Type: Bug
> Components: Store
> Affects Versions: 1.9, 2.0.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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]