I wish Lucene query explanations were easier to localise
--------------------------------------------------------
Key: LUCENE-3013
URL: https://issues.apache.org/jira/browse/LUCENE-3013
Project: Lucene - Java
Issue Type: Wish
Components: Query/Scoring
Reporter: Trejkaz
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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]