Class IndexingSession
java.lang.Object
org.ctan.site.services.search.base.IndexingBase
org.ctan.site.services.search.base.IndexingSession
- All Implemented Interfaces:
Closeable
,AutoCloseable
The class
IndexingSession
contains the session which combines
various update operations on the search indices.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The classIndexArgs
contains the transport object for passing in indexing arguments. -
Constructor Summary
ConstructorsConstructorDescriptionIndexingSession
(@NonNull File indexBase) This is the constructor forIndexingSession
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
The methodremove
provides means to remove an item from the search index.void
updateIndex
(@NotNull String path, @NotNull IndexingSession.IndexArgs args) The methodupdateIndex
provides means to update the search index.Methods inherited from class org.ctan.site.services.search.base.IndexingBase
checkIndexDirectory, directory, indexPath, open, open
-
Constructor Details
-
IndexingSession
This is the constructor forIndexingSession
.- Parameters:
indexBase
- the base directory- Throws:
FileNotFoundException
- in case of an improper directory
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
- See Also:
-
remove
public void remove(@NotNull @NotNull IndexType indexType, @NotNull @NotNull String indexPath, @NotNull @NotNull String locale) throws IOException The methodremove
provides means to remove an item from the search index.- Parameters:
indexType
- the index typeindexPath
- the key for identifying the indexed itemlocale
- the locale- Throws:
IOException
- in case of an I/O error
-
updateIndex
public void updateIndex(@NotNull @NotNull String path, @NotNull @NotNull IndexingSession.IndexArgs args) throws IOException The methodupdateIndex
provides means to update the search index.- Parameters:
path
- the URL of the itemargs
- the arguments- Throws:
IOException
- in case of an I/O error
-