Details
-
Wish
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
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
- blocks
-
LUCENE-3118 Tools for making explanations easier to consume/understand
- Open
- is related to
-
SOLR-3124 explain output is confusing when using trie fields (or any field type where the indexed terms are not human readable)
- Open