Denodo Aracne API - Search/Indexing¶
Denodo Aracne exposes an API that allows searching and/or modifying the content of an index:
These functionalities are provided by using the facade
com.denodo.arn.index.client.IndexManager that exposes the following
find: This allows searching the index. This method presents various signatures: if a search query is specified, it only returns the documents obtained based on this query; otherwise, it returns all the index documents. This also allows activating the functionality of highlighting in such a way that the query words appear highlighted (with a different color) in the search results (the default configuration can be used, or it can be specified in the object
HighlightConfig). It is also possible to obtain the most relevant terms that appear in any document field. More detail about this method is provided below.
getFields: This obtains a list of all the unique fields existing in the index.
listIndices: This method returns metadata about the indexes in the server. For each index, an
IndexEngineMetadataobject is returned. This object includes the list of fields that will be returned by a search executed on that index.
addDocument: This adds a document to an index.
addDocuments: This adds a set of documents to an index.
changePassword: This allows clients to change their password.
changeServerPorts: This allows modifying the port numbers used by the server.
deleteDocuments: This allows deleting (from one or several indexes) all the documents obtained as the result of a query.
deleteDocuments: This deletes documents from an index based on a query or a value for a specific index field.
find methods return a
DocumentChunk-type object. This class
represents a collection of objects of the class
encapsulates each document returned by a search. The
represents the document fields as entries in a java Map. If the document
was obtained as result to a search query, the
Document class also
includes the field “contextual summary” that contains some selected
sentences from the document where the keywords in the search expression
appear. The apparitions of the keywords field can be delimited between
special marks by using the
options explained below.
find method accepts the following parameters:
nameof the index on which the search is to be made.
startIndexindicates the number of the first result to be obtained. It is useful for implementing pagination schemes.
countindicates the number of results to be obtained with the query. It is useful for implementing pagination schemes.
queryindicates the search expression (see the syntax in section Apache Lucene Search Syntax).
mainTermsConfigurationindicates the configuration required in order to obtain the most relevant terms of the desired index fields (see section Most Relevant Terms of a Document).
enableHighlightallows activating the appearance of words between marks in the query results.
highlightConfigallows specifying the configuration of the marks for the highlighted words.
For more information consult the Denodo Aracne Javadoc documentation and
the examples in