Walter -
I’ve done several one-off demos that have incorporated as-you-type Ajax actions
into /browse. The first one I did was “instant search” (not suggest) and left
that sitting over at my “instant_search” branch - of svn(!). See the top two
commits listed here:
https://github.com/erikhatcher/lucene-solr-svn/commits/instant_search
Lately I’ve been building typeahead solutions using a separate collection
rather than the Suggester component and wiring that into /browse with just this
sort of thing:
$(function() { $(‘#search_box').bind("keyup",load_results); });
where load_results() does this:
$(‘#results’).load(…url with q=<search box contents>…)
It’s awesome to hear you use wt=velocity - made my day! And by “in 6.5.1” you
mean it is in the way old tech products configset where it uses an ancient
jquery.autocomplete feature. You could probably adapt that bit
straightforwardly to another endpoint and adjusting the `extraParams` in there
appropriately. The trick used here is that the response from /terms is simply
a single suggestion per line in plain text, by way of using wt=velocity with
v.template=suggest:
#foreach($t in $response.response.terms.name)
$t.key
#end
Adjust that template to deal with your suggester end-point response so that it
writes out one per line as plain text and you’re there. Happy to help
further if you run into any issues.
And yes, it’d be nice if this got built-in more modernly into the out of the
box /browse. If you want to open a JIRA and hack through it together I’m game.
Erik
> On Jun 5, 2017, at 4:14 PM, Walter Underwood <[email protected]> wrote:
>
> Does anyone have the new suggester working in the Velocity browse UI? In
> 6.5.1, it uses the terms component.
>
> I could probably figure out how to do that in Velocity, but if someone has
> already done that, it would be great.
>
> We use the Velocity UI as an internal exploration and diagnostic search page.
>
> wunder
> Walter Underwood
> [email protected]
> http://observer.wunderwood.org/ (my blog)
>
>