Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3013

I wish Lucene query explanations were easier to localise

Details

    • Wish
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core/query/scoring
    • New

    Description

      Often users ask us to provide a nice UI to explain why a document matched their query. Currently the strings output by Explanation are very advanced, and probably only understandable to those who have worked on Lucene. I took a shot at trying to make them friendlier, but it basically came down to parsing the strings it output and trying to figure out what kind of query was at each point (the inability to get to a Query from the Explanation is a small part of the problem here), formulating the result into readable English. In the end it seems a bit too hard.

      The solution to this could be done in at least two ways:

      1. Add getLocalizedSummary() / getLocalizedDescription() method(s) and use resource bundles internally. Projects wishing to localise these could add their own resource bundles to the classpath and/or get them contributed to Lucene.

      2. Add subclasses of Explanation with enough methods for callers to interrogate the individual details of the explanation instead of outputting it as a monolithic string.

      I do like the tree structure of explanations a lot (as it resembles the query tree), I just think there is work to be done splitting up the strings into usable fragments of information.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              trejkaz Trejkaz
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: