Class IndexingBase
java.lang.Object
org.ctan.site.services.search.base.IndexingBase
- Direct Known Subclasses:
IndexingService
,IndexingSession
,SearchService
The class
IndexingBase
contains the base class for indexing.-
Constructor Summary
ConstructorsConstructorDescriptionIndexingBase
(@NonNull File indexBase) This is the constructor forIndexingBase
.IndexingBase
(@NonNull CtanConfiguration.IndexConfig config) This is the constructor forIndexingBase
. -
Method Summary
Modifier and TypeMethodDescriptionprotected File
checkIndexDirectory
(File dir) The methodcheckIndexDirectory
provides means to check whether the index exists.protected String
The methoddirectory
provides means to get the name of the directory.protected Path
The methodindexPath
provides means to get the index path.protected org.apache.lucene.store.FSDirectory
The methodopen
provides means to open an index.protected org.apache.lucene.store.FSDirectory
The methodopen
provides means to open an index.
-
Constructor Details
-
IndexingBase
This is the constructor forIndexingBase
.- Parameters:
indexBase
- the base directory
-
IndexingBase
public IndexingBase(@NonNull @NonNull CtanConfiguration.IndexConfig config) throws FileNotFoundException This is the constructor forIndexingBase
.- Parameters:
config
- the configuration- Throws:
FileNotFoundException
- in case of an improper base directory
-
-
Method Details
-
checkIndexDirectory
The methodcheckIndexDirectory
provides means to check whether the index exists.- Parameters:
dir
- the directory denoting the base directory for the index- Returns:
- the argument
- Throws:
FileNotFoundException
- in case of an error
-
directory
The methoddirectory
provides means to get the name of the directory.- Parameters:
type
- the typelocale
- the language- Returns:
- the directory name
-
indexPath
The methodindexPath
provides means to get the index path.- Parameters:
type
- the typelocale
- the language- Returns:
- the path
-
open
protected org.apache.lucene.store.FSDirectory open(IndexType type, String locale) throws IOException The methodopen
provides means to open an index.- Parameters:
type
- the typelocale
- the language- Returns:
- the directory
- Throws:
IOException
- in case of an I/O error
-
open
The methodopen
provides means to open an index.- Parameters:
index
- the index- Returns:
- the directory
- Throws:
IOException
- in case of an I/O error
-