You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short, AI should be a "map", not have fixed fields like now. Hence, user adding new IndexCreator is easily able to introduce new fields to index (that's possible even now), and also get them back via standard API.
I have a concrete use case that I'll elaborate here. I am a new user of Lucene (no idea what I'm doing :-)) and of the Maven Indexer. Hopefully my explanation below will give you insight into how a person new to this project approaches it.
I'd like to write an IndexCreator that, in the abstract, adds fields to the index that represent certain contents of META-INF/MANIFEST.MF files. I'd like to let users search, for example, for artifacts containing META-INF/MANIFEST.MF files with Fred in their Class-Path headers.
I see no way to simply write an IndexCreator (and no other code) to do this. It seems that I would (with the current architecture) have to edit ArtifactInfo to have some new instance variables to store this information.
It also looks like other IndexCreator implementations that work with META-INF/MANIFEST.MF files, like the OsgiArtifactIndexCreator, do exactly this: I note that ArtifactInfo, though it would seem to want to be a generic sort of class, has fields in it like bundleSymbolicName, suggesting that for every indexer an edit to ArtifactInfo's source code is necessary. This shouldn't be the case.
Completely agreed and the comment above is in agreement with foreseen change. Still, am moving this change out of 6.0 release, as it would introduce breaking change (ArtifactInfo would need to be rewritten), will be done post 6.0
Activity
jira-importer commentedon Aug 19, 2014
Martin Todorov commented
@Tamas: Could you please elaborate a bit further?jira-importer commentedon Aug 27, 2014
Tamas Cservenak commented
In short, AI should be a "map", not have fixed fields like now. Hence, user adding new IndexCreator is easily able to introduce new fields to index (that's possible even now), and also get them back via standard API.
Look at this class
https://github.com/apache/maven-indexer/blob/master/indexer-core/src/main/java/org/apache/maven/index/ArtifactInfoRecord.java
jira-importer commentedon Mar 30, 2017
Laird Nelson commented
I have a concrete use case that I'll elaborate here. I am a new user of Lucene (no idea what I'm doing :-)) and of the Maven Indexer. Hopefully my explanation below will give you insight into how a person new to this project approaches it.
I'd like to write an
IndexCreatorthat, in the abstract, adds fields to the index that represent certain contents ofMETA-INF/MANIFEST.MFfiles. I'd like to let users search, for example, for artifacts containingMETA-INF/MANIFEST.MFfiles withFredin theirClass-Pathheaders.I see no way to simply write an
IndexCreator(and no other code) to do this. It seems that I would (with the current architecture) have to editArtifactInfoto have some new instance variables to store this information.It also looks like other
IndexCreatorimplementations that work withMETA-INF/MANIFEST.MFfiles, like theOsgiArtifactIndexCreator, do exactly this: I note thatArtifactInfo, though it would seem to want to be a generic sort of class, has fields in it likebundleSymbolicName, suggesting that for every indexer an edit toArtifactInfo's source code is necessary. This shouldn't be the case.jira-importer commentedon Nov 24, 2017
Tamas Cservenak commented
Completely agreed and the comment above is in agreement with foreseen change. Still, am moving this change out of 6.0 release, as it would introduce breaking change (ArtifactInfo would need to be rewritten), will be done post 6.0
jira-importer commentedon Nov 4, 2022
Tamas Cservenak commented
Move out from 7.0.0, this is not trivial effort, but release is imminent.