Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven indexer does not support querying fields that are both STORED and ANALYZED #14

Open
Lambeaux opened this issue Nov 10, 2020 · 0 comments
Labels
context/experimental Applies to a specific branch (not master) type/question Further information is requested

Comments

@Lambeaux
Copy link
Contributor

Scope

Applies to experiment: https://github.com/connexta/osg-eyes/tree/mvn-indexing

Goal

What was the rationale for not supporting the following behavior?

Notes

The following warning message is logged:

<TYPE> type of querying for non-keyword (but stored) field <FIELD> was tried. 
Please review your code, or indexCreator involved, since this type of querying 
of this field is currently unsupported.

Refer to the follow lines for the precise location where the error occurs during query construction: https://github.com/apache/maven-indexer/blob/maven-indexer-6.0.0/indexer-core/src/main/java/org/apache/maven/index/DefaultQueryCreator.java#L239-L244

Note that the maven indexer is still using an older version of Lucene (5.5.5) and as a result some deprecated APIs. For reference, here are the relevant options for both storing and indexing a field:
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/5.5.5/lucene/core/src/java/org/apache/lucene/document/Field.java#L654-L714

For some reason, the indexer does not support searching on Lucene fields that are both STORED and ANALYZED. Stored fields that are also indexed must be considered "keywords" (not sure if that's maven or lucene vernacular) and are only supported when indexed as NOT_ANALYZED. I suspect this has to do with tradeoffs of tokenization but I'm not 100% sure.

Leaving this issue around so it can be investigated later.

@Lambeaux Lambeaux added the context/experimental Applies to a specific branch (not master) label Nov 10, 2020
@Lambeaux Lambeaux added the type/question Further information is requested label Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context/experimental Applies to a specific branch (not master) type/question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant