WSO2 DAS has a distributed indexing engine which is built on top of Apache Lucene. Data is indexed and saved in the Data Access Layer of DAS in a store referred to as the Analytics File System. This section explains how indexing is used in WSO2 DAS.
Selecting data to be indexed
The following needs to be done when persisting data for interactive analytics.
- If you want to search for data by a specific attribute in an event stream, the Index Column check box should be selected for it.
- If you want to carry out faceted extended searches using a specific attribute, the Is a Facet check box should be selected for it.
The following needs to be done in order to ensure that the data is indexed as required.
- If you want to search for data by a specific attribute in an event stream, one or more events with values for the relevant attribute should be published.
- If you want to carry out faceted extended searches using a specific attribute, the value for that attribute should be entered as follows.
- The complete value should be within square brackets.
- The different categories embedded within the value should be separated by commas.
The following table summarizes the indexing actions required for each search action.
|Persisting Data for Analytics||Publishing Events|
|Search Action||Define Attribute as Index Column?||Define Attribute as Facet?||Insert Attribute Value Within Square Brackets?||Separate Sub Values of Attribute Value with Commas?||Insert Sub Values Within Single Quotation Marks?|
|Searching by an attribute||Required||Not required||Not required||Not required||Required if the attribute value contains spaces.|
|Extracting sub categories|
|Required||Required||Required||Required if the attribute value contains spaces.|
|Performing a drill down search||Required||Required||Required||Required||Required if the attribute value contains spaces.|
|Searching within a value range||Required||Not required||Not required||Not required||Not required|
For detailed instructions to carry out different search actions using examples, see Searching for Data.
Removing index data
The index data stored in your system can be cleared using one of the following methods.
Index data cannot be deleted by clearing databases.
- Clear index data via REST API. For more information, see Clear Index Information of a Given Table via REST API.
- Delete the <DAS_HOME>/repository/data directory.
If you want to remove both event data and index data, see Configuring Data Persistence - Removing persisted data.