Package com.mindstore.backend.service
Interface TextIndexService
- All Known Implementing Classes:
TextIndexServiceImpl
public interface TextIndexService
interface for managing text documents
-
Method Summary
Modifier and TypeMethodDescriptionvoidfunction for deleting text documentsvoidfunction: deletes all textDocuments that are availablebooleanexistsByTitle(String title) function: check if textDocuments exist with a specific title, used in testsvoidindexText(TextDocument text) function: index a text into our opensearch client
-
Method Details
-
indexText
function: index a text into our opensearch client- Parameters:
text- the TextDocument we want to index
-
existsByTitle
function: check if textDocuments exist with a specific title, used in tests- Parameters:
title- string- Returns:
- true if the title exists, else false
-
deleteAll
function: deletes all textDocuments that are available- Throws:
IOException- when there is an error deleting all entries
-
delete
function for deleting text documents- Parameters:
id- - the textDocument id to delete- Throws:
IOException- when deletion fails
-