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`, `SearchProvider`

    public class KendraSearchProvider
    extends java.lang.Object
    implements 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
`KendraSearchProvider()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected com.amazonaws.services.kendra.AWSkendra` `buildClient()`
`java.util.Collection<org.apache.wiki.api.search.SearchResult>` `findPages​(java.lang.String query, org.apache.wiki.api.core.Context wikiContext)`
`java.lang.String` `getDataSourceName()`
`java.lang.String` `getIndexName()`
`com.amazonaws.services.kendra.AWSkendra` `getKendra()`
`java.lang.String` `getProviderInfo()`
`void` `initialize​(org.apache.wiki.api.core.Engine engine, java.util.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 Detail

#### KendraSearchProvider

    public KendraSearchProvider()

### Method Detail

#### initialize

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

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

#### getProviderInfo

    public java.lang.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 `SearchProvider`

#### reindexPage

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

Specified by:
  `reindexPage` in interface `SearchProvider`

#### findPages

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

Specified by:
  `findPages` in interface `SearchProvider`
Throws:
  `org.apache.wiki.api.exceptions.ProviderException`
  `java.io.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 java.lang.String getIndexName()

#### getDataSourceName

    public java.lang.String getDataSourceName()