Hi all, I am trying to use Apache maven indexer to retrieve artifacts whose for example their lastModified field indicates a date between January and February of this year (1). Then, for each artifact retrieved, I would like to get the classNames field value (2).
To achieve it I tried to use the API provided with Maven indexer and the Lucene API but with both methods it seems impossible to fullfill requirements (1) and (2) at the same time. By using the Maven indexer API (c.f. [1]) I retrieve artifacts for the desired period of time but when I access to the field classNames I get null instead of the right value for artifacts with packaging of type JAR. However, I have specified a JarFileContentsIndexCreator for indexers. Is there a bug during reconstruction of artifacts info, is it a correct behavior or do I miss something? My second idea was to use directly Lucene to retrieve what I need but according to the implementation MinimalArtifactInfoIndexCreator declares the field lastModified (FLD_LAST_MODIFIED) as being not indexed. Thus, it is impossible to perform a search by using the efficient NumericRangeFilter predicate. Moreover, in terms of execution time this method would be better than the first solution that uses an ArtifactFilter which is iteratively applied among all the documents. Is it not possible to index this field? More generally, does someone has a method to achieve requirement (1) and (2)? [1] http://pastebin.com/raw.php?i=qaNXjWT5 Thanks. Kind Regards, Laurent --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org