exist
exist copied to clipboard
WIP: support lucene suggestions
Lucene provides a package to generate suggestion lists based on an index, which can be presented to users to help formulating a query. This PR integrates the feature into eXist's lucene-based indexing. It also refactors the index package to get a cleaner separation between the lucene full-text index and the range index.
While eXist always had a feature to read index terms via XQuery, this method often fails if the text was passed through an analyzer, e.g. to apply language-dependent stemming to the tokenized text. Lucene's own suggestion package does address this problem, taking analyzers into account properly.
Work in progress, do not merge.
See tests in extensions/indexes/lucene/src/test/xquery/lucene/suggestions.xql