GitHub user Enygma2002 opened a pull request:
https://github.com/apache/maven-indexer/pull/9
Indexing a repository with the indexer-cli (using -i and -r parameters)
creates an empty packed index.
Caused by the fact that the IndexSearcher obtained before indexer.scan() is
called is the same one that is passed to the IndexPackingUpdate, however, once
indexer.scan() is executed, the context's (directory) content is replaced with
the temporary one (used for downloading) but the previously returned
IndexSearcher is invalidated by the DefaultIndexingContext.openAndWarmup()
method that is called for the new index directory. Any packing operation that
is attempted from this point will produce an empty packed index instead of
using the actual index content produced by the indexer.scan() method.
Fixed by acquiring the indexSearcher *after* the indexer.scan() method
finishes, so that the pack operation works with the actual data and produces a
proper packed index.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Enygma2002/maven-indexer master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/maven-indexer/pull/9.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9
----
commit 3241c273d2d8acf4fb07899beffbfaf7fe083ebd
Author: Eduard Moraru <[email protected]>
Date: 2015-01-12T13:43:57Z
Indexing a repository with the indexer-cli (using -i and -r parameters)
creates an empty packed index.
Caused by the fact that the IndexSearcher obtained before indexer.scan() is
called is the same one that is passed to the IndexPackingUpdate, however, once
indexer.scan() is executed, the context's (directory) content is replaced with
the temporay one (used for downloading) but the previously returned
IndexSearcher is invalidated by the DefaultIndexingContext.openAndWarmup()
method that is called for the new index directory. Any packing operation that
is attempted from this point will produce an empty packed index instead of
using the actual index content produced by the indexer.scan() method.
Fixed by acquireing the indexSearcher *after* the indexer.scan() method
finishes, so that the pack operation works with the actual data and produces a
proper packed index.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]