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 operations:

  • 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 IndexEngineMetadata object 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.

The find methods return a DocumentChunk-type object. This class represents a collection of objects of the class Document that encapsulates each document returned by a search. The Document class 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 enableHighlight and highlightConfig options explained below.

The find method accepts the following parameters:

  • index indicates the name of the index on which the search is to be made.
  • startIndex indicates the number of the first result to be obtained. It is useful for implementing pagination schemes.
  • count indicates the number of results to be obtained with the query. It is useful for implementing pagination schemes.
  • query indicates the search expression (see the syntax in section Apache Lucene Search Syntax).
  • mainTermsConfiguration indicates the configuration required in order to obtain the most relevant terms of the desired index fields (see section Most Relevant Terms of a Document).
  • enableHighlight allows activating the appearance of words between marks in the query results.
  • highlightConfig allows specifying the configuration of the marks for the highlighted words.

For more information consult the Denodo Aracne Javadoc documentation and the examples in <DENODO_HOME>/samples/arn/arn-index-api.