You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Andy <an...@yahoo.com> on 2010/06/19 09:28:15 UTC

Non-prefix, hierarchical autocomplete? Would SOLR-1316 work? Solritas?

Hi,

I've seen some posts on using SOLR-1316 or Solritas for autocomplete. Wondered what is the best solution for my use case:

1) I would like to have an "hierarchical" autocomplete. For example, I have a "Country" dropdown list and a "City" textbox. A user would select a country from the dropdown list, and then type out the City in the textbox. Based on which country he selected, I want to limit the autocomplete suggestions to cities that are relevant for the selected country.

This hierarchy could be multi-level. For example, there may be a "Neighborhood" textbox. The autocomplete suggestions for "Neighborhood" would be limited to neighborhoods that are relevant for the city entered by the user in the "City" textbox.

2) I want to have autocomplete suggestions that includes non-prefix matches. For example, if the user type "auto", the autocomplete suggestions should include terms such as "automata" and "build automation".

3) I'm doing autocomplete for tags. I would like to allow multi-word tags and use comma (",") as a separator for tags. So when the use hits the space bar, he is still typing out the same tag, but when he hits the comma key, he's starting a new tag.

Would SOLR-1316 or Solritas work for the above requirements? If they do how do I set it up? I can't really find much documentation on SOLR-1316 or Solritas in this area.

Thanks.


      

Re: Non-prefix, hierarchical autocomplete? Would SOLR-1316 work? Solritas?

Posted by Erik Hatcher <er...@gmail.com>.
Solritas is a way to view Solr responses in a more user friendly way,  
it isn't going to help with the underlying suggest mechanism, just the  
presentation of it.

	Erik

On Jun 19, 2010, at 3:28 AM, Andy wrote:

> Hi,
>
> I've seen some posts on using SOLR-1316 or Solritas for  
> autocomplete. Wondered what is the best solution for my use case:
>
> 1) I would like to have an "hierarchical" autocomplete. For example,  
> I have a "Country" dropdown list and a "City" textbox. A user would  
> select a country from the dropdown list, and then type out the City  
> in the textbox. Based on which country he selected, I want to limit  
> the autocomplete suggestions to cities that are relevant for the  
> selected country.
>
> This hierarchy could be multi-level. For example, there may be a  
> "Neighborhood" textbox. The autocomplete suggestions for  
> "Neighborhood" would be limited to neighborhoods that are relevant  
> for the city entered by the user in the "City" textbox.
>
> 2) I want to have autocomplete suggestions that includes non-prefix  
> matches. For example, if the user type "auto", the autocomplete  
> suggestions should include terms such as "automata" and "build  
> automation".
>
> 3) I'm doing autocomplete for tags. I would like to allow multi-word  
> tags and use comma (",") as a separator for tags. So when the use  
> hits the space bar, he is still typing out the same tag, but when he  
> hits the comma key, he's starting a new tag.
>
> Would SOLR-1316 or Solritas work for the above requirements? If they  
> do how do I set it up? I can't really find much documentation on  
> SOLR-1316 or Solritas in this area.
>
> Thanks.
>
>
>


Re: Non-prefix, hierarchical autocomplete? Would SOLR-1316 work? Solritas?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi Andy,

I didn't check out SOLR-1316 yet, other then looking at the comments.  Sounds more complicated than it should be, but maybe it's great and I really need to try it.
Solritas uses TermsComponent, which should work well for individual terms (which country and city names are not, unless you tokenize them as single tokens).
I don't think there is anything that will do everything you need out of the box.
You can get autocompletion on the country field, but you then need to do a bit of JS work to restrict cities to the country specified in the country field.  Actually, now that I wrote this, I think we did something very much like that with http://sematext.com/products/autocomplete/index.html .
Finally, for dealing with commas or spaces as tag separators, you can peak at the JS in a service like delicious.com and see how they do it.  Their implementation of tag entry is nice.

And here is another slick auto-complete with extra niceness in the search form itself, from one of our customers: http://www.etsy.com/explorer 
Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



----- Original Message ----
> From: Andy <an...@yahoo.com>
> To: solr-user@lucene.apache.org
> Sent: Sat, June 19, 2010 3:28:15 AM
> Subject: Non-prefix, hierarchical autocomplete? Would SOLR-1316 work? Solritas?
> 
> Hi,

I've seen some posts on using SOLR-1316 or Solritas for autocomplete. 
> Wondered what is the best solution for my use case:

1) I would like to 
> have an "hierarchical" autocomplete. For example, I have a "Country" dropdown 
> list and a "City" textbox. A user would select a country from the dropdown list, 
> and then type out the City in the textbox. Based on which country he selected, I 
> want to limit the autocomplete suggestions to cities that are relevant for the 
> selected country.

This hierarchy could be multi-level. For example, there 
> may be a "Neighborhood" textbox. The autocomplete suggestions for "Neighborhood" 
> would be limited to neighborhoods that are relevant for the city entered by the 
> user in the "City" textbox.

2) I want to have autocomplete suggestions 
> that includes non-prefix matches. For example, if the user type "auto", the 
> autocomplete suggestions should include terms such as "automata" and "build 
> automation".

3) I'm doing autocomplete for tags. I would like to allow 
> multi-word tags and use comma (",") as a separator for tags. So when the use 
> hits the space bar, he is still typing out the same tag, but when he hits the 
> comma key, he's starting a new tag.

Would SOLR-1316 or Solritas work for 
> the above requirements? If they do how do I set it up? I can't really find much 
> documentation on SOLR-1316 or Solritas in this 
> area.

Thanks.

Re: Non-prefix, hierarchical autocomplete? Would SOLR-1316 work? Solritas?

Posted by Andy <an...@yahoo.com>.
Forgot to add, I would like to order the autocomplete suggestions for tags/cities based on how many times they are present in the documents.

--- On Sat, 6/19/10, Andy <an...@yahoo.com> wrote:

> From: Andy <an...@yahoo.com>
> Subject: Non-prefix, hierarchical autocomplete? Would SOLR-1316 work? Solritas?
> To: solr-user@lucene.apache.org
> Date: Saturday, June 19, 2010, 3:28 AM
> Hi,
> 
> I've seen some posts on using SOLR-1316 or Solritas for
> autocomplete. Wondered what is the best solution for my use
> case:
> 
> 1) I would like to have an "hierarchical" autocomplete. For
> example, I have a "Country" dropdown list and a "City"
> textbox. A user would select a country from the dropdown
> list, and then type out the City in the textbox. Based on
> which country he selected, I want to limit the autocomplete
> suggestions to cities that are relevant for the selected
> country.
> 
> This hierarchy could be multi-level. For example, there may
> be a "Neighborhood" textbox. The autocomplete suggestions
> for "Neighborhood" would be limited to neighborhoods that
> are relevant for the city entered by the user in the "City"
> textbox.
> 
> 2) I want to have autocomplete suggestions that includes
> non-prefix matches. For example, if the user type "auto",
> the autocomplete suggestions should include terms such as
> "automata" and "build automation".
> 
> 3) I'm doing autocomplete for tags. I would like to allow
> multi-word tags and use comma (",") as a separator for tags.
> So when the use hits the space bar, he is still typing out
> the same tag, but when he hits the comma key, he's starting
> a new tag.
> 
> Would SOLR-1316 or Solritas work for the above
> requirements? If they do how do I set it up? I can't really
> find much documentation on SOLR-1316 or Solritas in this
> area.
> 
> Thanks.
> 
> 
>       
>