Class TurLuceneUtils
java.lang.Object
com.viglet.turing.lucene.TurLuceneUtils
Static utilities for Lucene core (index directory) management.
Mirrors
TurSolrUtils for the Lucene engine.
In Lucene, a "core" corresponds to a directory on the filesystem that
contains a Lucene index. The basePath is the value of
TurSEInstance.endpointUrl for Lucene-backed SE instances.
Field management is intentionally a no-op: Lucene is schema-less and field types are tracked in the Turing JPA model (TurSNSiteField).
- Since:
- 2026.1
- Author:
- Alexandre Oliveira
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddOrUpdateField(String basePath, String coreName, String fieldName) No-op for Lucene: field types are tracked in the JPA model; the index itself is schema-less and accepts any field at index time.static booleancoreExists(String basePath, String coreName) Returns true if the given core directory exists and is a directory.static voidcreateCore(String basePath, String coreName) Creates the directory for a Lucene core.static voiddeleteCore(String basePath, String coreName) Deletes the directory (and all index files) for a Lucene core.static voiddeleteField(String basePath, String coreName, String fieldName) No-op for Lucene: removing a field definition only requires updating the JPA model — existing indexed values are not retroactively removed.static List<TurSECoreInfo> Lists all direct sub-directories ofbasePathas cores.
-
Method Details
-
createCore
-
deleteCore
-
coreExists
-
listCores
Lists all direct sub-directories ofbasePathas cores. Returns basic info: name and approximate doc count (not exact without opening the index). -
addOrUpdateField
-
deleteField
-