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.AWSkendra
Collection<org.apache.wiki.api.search.SearchResult>
com.amazonaws.services.kendra.AWSkendra
void
initialize
(org.apache.wiki.api.core.Engine engine, Properties properties) void
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)
-
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 interfaceorg.apache.wiki.api.providers.WikiProvider
- Throws:
org.apache.wiki.api.exceptions.NoRequiredPropertyException
IOException
-
getProviderInfo
- Specified by:
getProviderInfo
in interfaceorg.apache.wiki.api.providers.WikiProvider
-
pageRemoved
- Specified by:
pageRemoved
in interfaceSearchProvider
-
reindexPage
- Specified by:
reindexPage
in 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:
findPages
in interfaceSearchProvider
- Throws:
org.apache.wiki.api.exceptions.ProviderException
IOException
-
initializeIndexAndDataSource
This method initialize the AWS Kendra Index and Datasources to be used. -
getKendra
-
setKendra
-
buildClient
-
getIndexName
-
getDataSourceName
-