You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Yonghui Zhao <zh...@gmail.com> on 2013/09/18 13:03:21 UTC
IndexFileNameFilter
In lucene 4.3.0 there is no IndexFileNameFilter.
And I find in org.apache.lucene.index.IndexFileNames the index file
extensions have only 3 types.
public static final String INDEX_EXTENSIONS[] = new String[] {
COMPOUND_FILE_EXTENSION,
COMPOUND_FILE_ENTRIES_EXTENSION,
GEN_EXTENSION,
};
But there should be many extensions such as: fdt fdx fnm. ...
I want to know if there is any elegant way to filter these extensions
rather than list all extensions by myself.
Re: IndexFileNameFilter
Posted by Adrien Grand <jp...@gmail.com>.
Hi,
On Wed, Sep 18, 2013 at 1:39 PM, Yonghui Zhao <zh...@gmail.com> wrote:
> Got it. Currently I don't use any custom codecs.
Part of the problem is that even the current codec keeps evolving, and
file extensions that exist today might not be used anymore in 6 months
and vice-versa. I would strongly recommend not relying on a method
that would tell whether a file belongs to Lucene or not.
--
Adrien
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: IndexFileNameFilter
Posted by Yonghui Zhao <zh...@gmail.com>.
Got it. Currently I don't use any custom codecs.
2013/9/18 Adrien Grand <jp...@gmail.com>
> Hi,
>
> Since Lucene 4.0 which introduced codecs, it is not possible anymore
> to know based on filename extensions whether files have been created
> by Lucene or not: every codec is free to use any file extension.
>
> On Wed, Sep 18, 2013 at 1:03 PM, Yonghui Zhao <zh...@gmail.com>
> wrote:
> > In lucene 4.3.0 there is no IndexFileNameFilter.
> >
> > And I find in org.apache.lucene.index.IndexFileNames the index file
> > extensions have only 3 types.
> >
> >
> > public static final String INDEX_EXTENSIONS[] = new String[] {
> > COMPOUND_FILE_EXTENSION,
> > COMPOUND_FILE_ENTRIES_EXTENSION,
> > GEN_EXTENSION,
> > };
> >
> >
> > But there should be many extensions such as: fdt fdx fnm. ...
> >
> > I want to know if there is any elegant way to filter these extensions
> > rather than list all extensions by myself.
>
>
>
> --
> Adrien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: IndexFileNameFilter
Posted by Adrien Grand <jp...@gmail.com>.
Hi,
Since Lucene 4.0 which introduced codecs, it is not possible anymore
to know based on filename extensions whether files have been created
by Lucene or not: every codec is free to use any file extension.
On Wed, Sep 18, 2013 at 1:03 PM, Yonghui Zhao <zh...@gmail.com> wrote:
> In lucene 4.3.0 there is no IndexFileNameFilter.
>
> And I find in org.apache.lucene.index.IndexFileNames the index file
> extensions have only 3 types.
>
>
> public static final String INDEX_EXTENSIONS[] = new String[] {
> COMPOUND_FILE_EXTENSION,
> COMPOUND_FILE_ENTRIES_EXTENSION,
> GEN_EXTENSION,
> };
>
>
> But there should be many extensions such as: fdt fdx fnm. ...
>
> I want to know if there is any elegant way to filter these extensions
> rather than list all extensions by myself.
--
Adrien
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org