|
SemanticSearchImplementation
|
Contains the main logic to use a document-based search engine for RDF-based metadata records. More...
Public Member Functions | |
| RdfSearchMapper (IRdfConnector connector, ISearchClient searchClient, string language) | |
Creates an instance of the class RdfSearchMapper. More... | |
| async Task | SearchAsync (string query, string user, bool advanced=SEARCH_ADVANCED, int size=SEARCH_SIZE, int from=SEARCH_FROM, string sorting=SEARCH_SORTING) |
| Executes a search query. More... | |
| async Task | AddDocumentAsync (string graphName) |
| Adds or updates a single document. More... | |
| async Task | DeleteDocumentAsync (string graphName) |
| Deletes a single document. More... | |
| async Task | CreateIndexAsync () |
| Creates a first index with indexes all existing metadata graphs. More... | |
| async Task | ReIndexAsync () |
| Creates a new index (and mapping) and reindexes all existing metadata graphs. More... | |
Private Member Functions | |
| IDictionary< string, JObject > | CreateDocument (string graphName, bool changeOtherDocs) |
| Creates the mapping of a metadata graph. More... | |
| string | GetCurrentIndex () |
Private Attributes | |
| readonly ISearchClient | _searchClient |
| readonly RdfClient | _RdfClient |
| ElasticsearchIndexMapper | _indexMapper |
| int | _version |
Static Private Attributes | |
| const int | SEARCH_SIZE = 50 |
| const int | SEARCH_FROM = 0 |
| const bool | SEARCH_ADVANCED = false |
| const string | SEARCH_SORTING = "['_score']" |
Contains the main logic to use a document-based search engine for RDF-based metadata records.
|
inline |
Creates an instance of the class RdfSearchMapper.
| connector | Instance of an IRdfConnector. |
| searchClient | Instance of an ISearchClient. |
| language | Abbreviated string representation of the language used. |
|
inline |
Adds or updates a single document.
| graphName | ID of metadata graph. |
|
inlineprivate |
Creates the mapping of a metadata graph.
Additional rules can influence the mapping of existing metadata graphs.
| graphName | ID of the metadata graph. |
| changeOtherDocs | A dictionary containing the ID of metadata graphs (key) and corresponding JSON objects (value). |
|
inline |
Creates a first index with indexes all existing metadata graphs.
|
inline |
Deletes a single document.
| graphName | ID of metadata graph. |
|
inlineprivate |
|
inline |
Creates a new index (and mapping) and reindexes all existing metadata graphs.
This operation is necessary if an application profile changes or a new is added.
|
inline |
Executes a search query.
| query | The search query of the user. |
| user | The user who searches. |
| advanced | lag 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). |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |