Skip to content

Conversation

@wolfgangmm
Copy link
Member

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

<text qname="document">
<suggest id="document-content"/>
<field name="content" analyzer="standard">
<suggest id="document-text" type="freetext"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test corresponding to this freetext suggestion type?

@adamretter adamretter added the in progress Issue is actively being worked upon label Jul 18, 2019
public final static FunctionSignature[] signatures = {
new FunctionSignature(
new QName("suggest", LuceneModule.NAMESPACE_URI, LuceneModule.PREFIX),
"Return a map of facet labels and counts for the result of a Lucene query.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong function description ;)

@line-o
Copy link
Member

line-o commented Jan 25, 2020

Should also support distinct indexing and query analysers. Could be implemented as in #2991 (#3227).

@line-o line-o added the Lucene issue is related to Lucene or its integration label Apr 8, 2020
@line-o line-o marked this pull request as draft April 9, 2020 19:33
@line-o line-o removed the in progress Issue is actively being worked upon label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Lucene issue is related to Lucene or its integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants