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
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected com.amazonaws.services.kendra.AWSkendraCollection<org.apache.wiki.api.search.SearchResult>com.amazonaws.services.kendra.AWSkendravoidinitialize(org.apache.wiki.api.core.Engine engine, Properties properties) voidThis method initialize the AWS Kendra Index and Datasources to be used.voidpageRemoved(org.apache.wiki.api.core.Page page) voidreindexPage(org.apache.wiki.api.core.Page page) voidsetKendra(com.amazonaws.services.kendra.AWSkendra kendra)
-
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:
initializein interfaceorg.apache.wiki.api.providers.WikiProvider- Throws:
org.apache.wiki.api.exceptions.NoRequiredPropertyExceptionIOException
-
getProviderInfo
- Specified by:
getProviderInfoin interfaceorg.apache.wiki.api.providers.WikiProvider
-
pageRemoved
- Specified by:
pageRemovedin interfaceSearchProvider
-
reindexPage
- Specified by:
reindexPagein interfaceSearchProvider
-
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:
findPagesin interfaceSearchProvider- Throws:
org.apache.wiki.api.exceptions.ProviderExceptionIOException
-
initializeIndexAndDataSource
This method initialize the AWS Kendra Index and Datasources to be used. -
getKendra
-
setKendra
-
buildClient
-
getIndexName
-
getDataSourceName
-