org.apache.lucene.index.IndexFileNameFilter Java Examples
The following examples show how to use
org.apache.lucene.index.IndexFileNameFilter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FSDirectory.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
private void create() throws IOException { if (directory.exists()) { String[] files = directory.list(IndexFileNameFilter.getFilter()); // clear old files if (files == null) throw new IOException("cannot read directory " + directory.getAbsolutePath() + ": list() returned null"); for (int i = 0; i < files.length; i++) { File file = new File(directory, files[i]); if (!file.delete()) throw new IOException("Cannot delete " + file); } } lockFactory.clearLock(IndexWriter.WRITE_LOCK_NAME); }
Example #2
Source File: FSDirectory.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
/** Returns an array of strings, one for each Lucene index file in the directory. */ public String[] list() { ensureOpen(); return directory.list(IndexFileNameFilter.getFilter()); }
Example #3
Source File: LuceneIndexFileNameFilter.java From RDFS with Apache License 2.0 | 4 votes |
private LuceneIndexFileNameFilter() { luceneFilter = IndexFileNameFilter.getFilter(); }
Example #4
Source File: LuceneIndexFileNameFilter.java From hadoop-gpu with Apache License 2.0 | 4 votes |
private LuceneIndexFileNameFilter() { luceneFilter = IndexFileNameFilter.getFilter(); }