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
Fix tags not properly indexed in Lucene #291
Conversation
All tags that reference to particular object are stored in a list within a map. There is a if statement that inits empty list when there are not references to the current object yet, but the boolean expression checks for the wrong value.
Hi, I opened this pull request to start a discussion more than to submit a patch. The
|
And also if I may ask (just out of curiosity) - why only the annotated tags are indexed? |
Oops. Good catch.
I agree and that was the intention.
Generally my answer is the indexer is trying to cover the 98% use-case of tags. While it is possible to tag a non-commit object, as you point out, I believe it to be an infrequently used capability. The indexer indexes commits (with and without tags) and blobs but it does not currently consider that a blob may be tagged. The JGit repo has a good example which tags Shawn's public GPG key. I'd add a Github link if they supported non-commit tags at all. :) I believe lightweight tags are intended to be used client-side not server-side due to their transitive nature and lack of tagger metadata. For this reason, lightweight tags are deliberately avoided by the indexer. If we did want to support them, the indexing process would have to be revised. Lucene does not have the ability to update a document so we'd have to destroy all documents which reference the lightweight tag and then re-index the affected objects. |
Thanks for the answers.
That's exactly what I had in mind.
That's very nice functionality. Using tags to point to GPG keys seems like a common use case. But when I click on the object link I get an internal server error. |
Fix tags not properly indexed in Lucene
All tags that reference to particular object are stored in a list within a map.
There is a if statement that inits empty list when there are not references
to the current object yet, but the boolean expression checks for the wrong value.