You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erik Hatcher (JIRA)" <ji...@apache.org> on 2014/08/06 03:30:14 UTC

[jira] [Comment Edited] (SOLR-4702) Velocity templates not rendering spellcheck suggestions correctly

    [ https://issues.apache.org/jira/browse/SOLR-4702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087085#comment-14087085 ] 

Erik Hatcher edited comment on SOLR-4702 at 8/6/14 1:28 AM:
------------------------------------------------------------

[~mbennett] - apologies for the delay on this.  The fix was committed earlier (for Solr 4.3), and I left this open to (eventually, heh) address your feedback after the commit.  I just committed an enhancement that shows all possible collation queries, along with their hit count; note that the counts are within the currently selected filters not globally.  Regarding the debugging, I recommend simply adding &wt=xml (or clicking the link in the footer) to get at the raw response suitable for developer-level debugging.  I also often simply put into the template $response... and $object.class kind of expressions directly into the template and refresh my browser to see gory details that help craft the templates.  We certainly could add more insight into the UI as you suggest, though under a new Jira.


was (Author: ehatcher):
[~mbennett] - apologies for the delay on this.  The fix was committed earlier (for Solr 4.3), and I left this open to (eventually, heh) address your feedback after the commit.  I just committed an enhancement that shows all possibly collation queries, along with their hit count; note that the counts are within the currently selected filters not globally.  Regarding the debugging, I recommend simply adding &wt=xml (or clicking the link in the footer) to get at the raw response suitable for developer-level debugging.  I also often simply put into the template $response... and $object.class kind of expressions directly into the template and refresh my browser to see gory details that help craft the templates.  We certainly could add more insight into the UI as you suggest, though under a new Jira.

> Velocity templates not rendering spellcheck suggestions correctly
> -----------------------------------------------------------------
>
>                 Key: SOLR-4702
>                 URL: https://issues.apache.org/jira/browse/SOLR-4702
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - Velocity
>    Affects Versions: 4.2
>            Reporter: Mark Bennett
>            Assignee: Erik Hatcher
>             Fix For: 4.3, 5.0, 4.10
>
>         Attachments: SOLR-4702.patch, SOLR-4702.patch, SOLR-4702.patch
>
>
> The spellcheck links, AKA "Did you mean", aren't rendered correctly.
> Instead of just having the corrected words, they have some .toString gibberish because the object being serialized is too high up in the tree.
> This breaks both the link text displayed to the user, and the href used for the anchor tag.
> Example:
> Search for "electronicss OR monitor" and you get:
> Did you mean {collationQuery=electronics OR monitor,hits=14,misspellingsAndCorrections={electronicss=electronics,monitor=monitor}}?
> But you should just see:
> Did you mean electronics OR monitor?   (with hyperlinked "electronics OR monitor")
> The actual query submitted by those links is similarly broken.  Possibly the templates were developed before collation was added and/or enabled by default.
> To see this bug at all with the example configs and docs you'll need to have applied SOLR-4680 or SOLR-4681 against 4.2 or trunk.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org