Package org.apache.wiki.search.kendra

# Class KendraSearchProvider

java.lang.Object
org.apache.wiki.search.kendra.KendraSearchProvider

All Implemented Interfaces:
  `org.apache.wiki.api.providers.WikiProvider`, `org.apache.wiki.search.SearchProvider`

public class KendraSearchProvider extends Object implements org.apache.wiki.search.SearchProvider
Search provider that implements {link SearchProvider} using AWS Kendra for indexing. Note that we are using a Custom DataSource which limits the attributes that can be uploaded / searched for each page (as per https://docs.aws.amazon.com/kendra/latest/dg/custom-attributes.html). This could be overcome by using an S3 bucket where any custom attributes can be added.

Since:
  2.11.0

## Field Summary

### Fields inherited from interface org.apache.wiki.api.providers.WikiProvider

`LATEST_VERSION`

## Constructor Summary

Constructors
Constructor
Description
`KendraSearchProvider()`

## Method Summary

Modifier and Type
Method
Description
`protected com.amazonaws.services.kendra.AWSkendra`
`buildClient()`
`Collection<org.apache.wiki.api.search.SearchResult>`
`findPages(String query, org.apache.wiki.api.core.Context wikiContext)`
`String`
`getDataSourceName()`
`String`
`getIndexName()`
`com.amazonaws.services.kendra.AWSkendra`
`getKendra()`
`String`
`getProviderInfo()`
`void`
`initialize(org.apache.wiki.api.core.Engine engine, Properties properties)`
`void`
`initializeIndexAndDataSource()`
This method initialize the AWS Kendra Index and Datasources to be used.
`void`
`pageRemoved(org.apache.wiki.api.core.Page page)`
`void`
`reindexPage(org.apache.wiki.api.core.Page page)`
`void`
`setKendra(com.amazonaws.services.kendra.AWSkendra kendra)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### KendraSearchProvider

public KendraSearchProvider()

## Method Details

### initialize

public void initialize(org.apache.wiki.api.core.Engine engine, Properties properties) throws org.apache.wiki.api.exceptions.NoRequiredPropertyException, IOException

Specified by:
  `initialize` in interface `org.apache.wiki.api.providers.WikiProvider`
Throws:
  `org.apache.wiki.api.exceptions.NoRequiredPropertyException`
  `IOException`

### getProviderInfo

public String getProviderInfo()

Specified by:
  `getProviderInfo` in interface `org.apache.wiki.api.providers.WikiProvider`

### pageRemoved

public void pageRemoved(org.apache.wiki.api.core.Page page)

Specified by:
  `pageRemoved` in interface `org.apache.wiki.search.SearchProvider`

### reindexPage

public void reindexPage(org.apache.wiki.api.core.Page page)

Specified by:
  `reindexPage` in interface `org.apache.wiki.search.SearchProvider`

### findPages

public Collection<org.apache.wiki.api.search.SearchResult> findPages(String query, org.apache.wiki.api.core.Context wikiContext) throws org.apache.wiki.api.exceptions.ProviderException, IOException

Specified by:
  `findPages` in interface `org.apache.wiki.search.SearchProvider`
Throws:
  `org.apache.wiki.api.exceptions.ProviderException`
  `IOException`

### initializeIndexAndDataSource

public void initializeIndexAndDataSource()
This method initialize the AWS Kendra Index and Datasources to be used.

### getKendra

public com.amazonaws.services.kendra.AWSkendra getKendra()

### setKendra

public void setKendra(com.amazonaws.services.kendra.AWSkendra kendra)

### buildClient

protected com.amazonaws.services.kendra.AWSkendra buildClient()

### getIndexName

public String getIndexName()

### getDataSourceName

public String getDataSourceName()