Package org.icij.datashare.text.indexing
Interface Indexer
-
- All Superinterfaces:
AutoCloseable,Closeable
public interface Indexer extends Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIndexer.Searcher
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOGGER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends Entity>
voidadd(String indexName, T obj)<T extends Entity>
booleanbulkAdd(String indexName, List<T> entities)booleanbulkAdd(String indexName, Pipeline.Type nerType, List<NamedEntity> namedEntities, Document parent)<T extends Entity>
booleanbulkUpdate(String indexName, List<T> entities)voidclose()booleancreateIndex(String indexName)booleandeleteAll(String indexName)StringexecuteRaw(String method, String url, String body)<T extends Entity>
Tget(String indexName, String id)<T extends Entity>
Tget(String indexName, String id, String root)ExtractedTextgetExtractedText(String indexName, String documentId, int offset, int limit)ExtractedTextgetExtractedText(String indexName, String documentId, int offset, int limit, String targetLanguage)ExtractedTextgetExtractedText(String indexName, String documentId, String rootDocument, int offset, int limit)ExtractedTextgetExtractedText(String indexName, String documentId, String rootDocument, int offset, int limit, String targetLanguage)booleangetHealth()Indexer.Searchersearch(List<String> indexesNames, Class<? extends Entity> entityClass)SearchedTextsearchTextOccurrences(String indexName, String documentId, String query, String targetLanguage)SearchedTextsearchTextOccurrences(String indexName, String documentId, String rootDocument, String query, String targetLanguage)booleantag(Project prj, String documentId, String rootDocument, Tag... tags)booleantag(Project prj, List<String> documentIds, Tag... tags)booleanuntag(Project prj, String documentId, String rootDocument, Tag... tags)booleanuntag(Project prj, List<String> documentIds, Tag... tags)<T extends Entity>
voidupdate(String indexName, T obj)
-
-
-
Method Detail
-
search
Indexer.Searcher search(List<String> indexesNames, Class<? extends Entity> entityClass)
-
createIndex
boolean createIndex(String indexName) throws IOException
- Throws:
IOException
-
deleteAll
boolean deleteAll(String indexName) throws IOException
- Throws:
IOException
-
getHealth
boolean getHealth()
-
close
void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
bulkAdd
boolean bulkAdd(String indexName, Pipeline.Type nerType, List<NamedEntity> namedEntities, Document parent) throws IOException
- Throws:
IOException
-
bulkAdd
<T extends Entity> boolean bulkAdd(String indexName, List<T> entities) throws IOException
- Throws:
IOException
-
bulkUpdate
<T extends Entity> boolean bulkUpdate(String indexName, List<T> entities) throws IOException
- Throws:
IOException
-
add
<T extends Entity> void add(String indexName, T obj) throws IOException
- Throws:
IOException
-
update
<T extends Entity> void update(String indexName, T obj) throws IOException
- Throws:
IOException
-
executeRaw
String executeRaw(String method, String url, String body) throws IOException
- Throws:
IOException
-
tag
boolean tag(Project prj, String documentId, String rootDocument, Tag... tags) throws IOException
- Throws:
IOException
-
untag
boolean untag(Project prj, String documentId, String rootDocument, Tag... tags) throws IOException
- Throws:
IOException
-
tag
boolean tag(Project prj, List<String> documentIds, Tag... tags) throws IOException
- Throws:
IOException
-
untag
boolean untag(Project prj, List<String> documentIds, Tag... tags) throws IOException
- Throws:
IOException
-
getExtractedText
ExtractedText getExtractedText(String indexName, String documentId, int offset, int limit) throws IOException
- Throws:
IOException
-
getExtractedText
ExtractedText getExtractedText(String indexName, String documentId, String rootDocument, int offset, int limit) throws IOException
- Throws:
IOException
-
getExtractedText
ExtractedText getExtractedText(String indexName, String documentId, int offset, int limit, String targetLanguage) throws IOException
- Throws:
IOException
-
getExtractedText
ExtractedText getExtractedText(String indexName, String documentId, String rootDocument, int offset, int limit, String targetLanguage) throws IOException
- Throws:
IOException
-
searchTextOccurrences
SearchedText searchTextOccurrences(String indexName, String documentId, String query, String targetLanguage) throws IOException
- Throws:
IOException
-
searchTextOccurrences
SearchedText searchTextOccurrences(String indexName, String documentId, String rootDocument, String query, String targetLanguage) throws IOException
- Throws:
IOException
-
-