Re: Velocity UI with Analyzing Infix Suggester?

2017-06-22 Thread Walter Underwood
The problem with the suggest response is that the suggest.q value is used as an 
attribute in the JSON response. That is just weird.

Is there some way to put in a wildcard in the Velocity selector? 
“$response.response.terms.name” works for /terms, but /suggest is different. 
And I’m running two suggesters anyway, both fuzzy and infix.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Jun 6, 2017, at 4:34 AM, Rick Leir  wrote:
> 
>> typeahead solutions using a separate collection
> 
> Erik, Do you use a separate collection so it can be smaller and thereby 
> faster? Or so you can keep good performance on the the main collection 
> server? In my mind, the performance of the as-you-type is more important than 
> the regular search.
> Cheers -- Rick
> 
> On June 6, 2017 5:31:08 AM EDT, Erik Hatcher  wrote:
>> 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=…)
>> 
>> 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 
>> 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
>>> wun...@wunderwood.org
>>> http://observer.wunderwood.org/  (my blog)
>>> 
>>> 
> 
> -- 
> Sorry for being brief. Alternate email is rickleir at yahoo dot com



Re: Velocity UI with Analyzing Infix Suggester?

2017-06-06 Thread Rick Leir
> typeahead solutions using a separate collection

Erik, Do you use a separate collection so it can be smaller and thereby faster? 
Or so you can keep good performance on the the main collection server? In my 
mind, the performance of the as-you-type is more important than the regular 
search.
Cheers -- Rick

On June 6, 2017 5:31:08 AM EDT, Erik Hatcher  wrote:
>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=…)
>
>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 
>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
>> wun...@wunderwood.org
>> http://observer.wunderwood.org/  (my blog)
>> 
>> 

-- 
Sorry for being brief. Alternate email is rickleir at yahoo dot com 

Re: Velocity UI with Analyzing Infix Suggester?

2017-06-06 Thread Erik Hatcher
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=…)

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  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
> wun...@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
> 
> 



Velocity UI with Analyzing Infix Suggester?

2017-06-05 Thread Walter Underwood
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
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)