SemanticSearchImplementation
|
Provides all necessary functions to implement a document-based search engine. More...
Public Member Functions | |
Task< IDictionary< string, string > > | GetMappingAsync () |
Queries the mappings of the current index. More... | |
Task | CreateIndexAsync (JObject content, string index) |
Creates an index with the given settings and mappings. More... | |
Task | AddDocumentsAsync (IEnumerable< JObject > documents) |
Adds the given documents as a bulk upload. More... | |
Task | SwitchAliasAsync (string from, string to) |
Changes the alias from the old to the new index. More... | |
Task | DeleteIndexAsync (string index) |
Deletes the given index. More... | |
Task | AddDocumentAsync (string graphName, IDictionary< string, JObject > documents) |
Adds/updates a new document and possibly changes existing documents. More... | |
Task | DeleteDocumentAsync (string graphName, IDictionary< string, JObject > documents) |
Deletes a document and possibly changes other existing documents. More... | |
void | ChangeIndex (string index) |
Updates the current index. More... | |
Task< IDictionary< string, double > > | SearchAsync (string query, IEnumerable< string > projects, bool advanced, int size, int from, string sorting) |
Searches the index using the alias. More... | |
Provides all necessary functions to implement a document-based search engine.
Task SemanticSearchImplementation.ISearchClient.AddDocumentAsync | ( | string | graphName, |
IDictionary< string, JObject > | documents | ||
) |
Adds/updates a new document and possibly changes existing documents.
Additional rules can influence the mapping of existing metadata graphs.
graphName | ID of the metadata graph to be added/updated. |
documents | A dictionary containing the ID of metadata graphs (key) and corresponding JSON objects (value). |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
Task SemanticSearchImplementation.ISearchClient.AddDocumentsAsync | ( | IEnumerable< JObject > | documents | ) |
Adds the given documents as a bulk upload.
documents | An enumerator of all documents as JSON object. |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
void SemanticSearchImplementation.ISearchClient.ChangeIndex | ( | string | index | ) |
Updates the current index.
index | Name of new current index. |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
Task SemanticSearchImplementation.ISearchClient.CreateIndexAsync | ( | JObject | content, |
string | index | ||
) |
Creates an index with the given settings and mappings.
content | JSON object containing the settings and mappings. |
index | The index name. |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
Task SemanticSearchImplementation.ISearchClient.DeleteDocumentAsync | ( | string | graphName, |
IDictionary< string, JObject > | documents | ||
) |
Deletes a document and possibly changes other existing documents.
Additional rules can influence the mapping of existing metadata graphs.
graphName | ID of the metadata graph to be deleted. |
documents | A dictionary containing the ID of metadata graphs (key) and corresponding JSON objects (value). |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
Task SemanticSearchImplementation.ISearchClient.DeleteIndexAsync | ( | string | index | ) |
Deletes the given index.
index | Name of the index. |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
Task<IDictionary<string, string> > SemanticSearchImplementation.ISearchClient.GetMappingAsync | ( | ) |
Queries the mappings of the current index.
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
Task<IDictionary<string, double> > SemanticSearchImplementation.ISearchClient.SearchAsync | ( | string | query, |
IEnumerable< string > | projects, | ||
bool | advanced, | ||
int | size, | ||
int | from, | ||
string | sorting | ||
) |
Searches the index using the alias.
query | The search query of the user. |
projects | List of allowed projects (of a user). |
advanced | Flag to specify simple or advanced search syntax. |
size | Number of results. |
from | Position from which the results should be returned. |
sorting | Sorting of the results (see https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html). |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.
Task SemanticSearchImplementation.ISearchClient.SwitchAliasAsync | ( | string | from, |
string | to | ||
) |
Changes the alias from the old to the new index.
from | Name of old index. |
to | Name of new index. |
Implemented in SemanticSearchImplementation.ElasticsearchSearchClient.