public interface SearchIndexSuggestionExtractor
Note: This only works with CRX / Jackrabbit as the underlying JCR repository, as this has to access the Lucene index directly to extract the terms; the search part of the JCR API does not cover this special case.
Modifier and Type | Interface and Description |
---|---|
static class |
SearchIndexSuggestionExtractor.Options
Data object for holding all configuration options for
buildIndex(Session, String, Options) . |
Modifier and Type | Method and Description |
---|---|
int |
buildIndex(Session session,
java.lang.String indexName,
SearchIndexSuggestionExtractor.Options options)
Creates or updates the
index at the given path
based on terms extracted from the Lucene search index of the underlying
CRX/Jackrabbit repository. |
int buildIndex(Session session, java.lang.String indexName, SearchIndexSuggestionExtractor.Options options)
index
at the given path
based on terms extracted from the Lucene search index of the underlying
CRX/Jackrabbit repository. Uses the index of the workspace behind the
given Session
. Various configuration parameters, for example
which fields from the index to use and what stop words list to use, can
be passed via the SearchIndexSuggestionExtractor.Options
.
Note that this will take terms from the entire repository.
Restricting it to content in a JCR subtree is not possible as this
information is not stored in the Lucene index. A trick is to store the
text to be indexed in a unique property (and maybe in a separate
workspace or repository), which is not used by other content. This
property would then be specified in SearchIndexSuggestionExtractor.Options.properties
.
session
- used to access the Lucene index for the workspaceindexName
- name or path for the SuggestionIndex
to create or
updateoptions
- configuration parameters"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"