Feature & design question: use autocomple​te to search on 2 different fields, and return 2 different data groups

2012-11-01 Thread fernando.beck
Hello,

 

 we're facing a new feature request, and we can't get the right way to come
up with a working solution. 

 

Context: we have a list of businesses . For each business we have: name,
category, address, city.
 
One business may have 1 or more categories.

 

Example:

Name: Outback SteakHouse

Category: Restaurants , American

Address: xx

City: Rio de Janeiro

  

Name: Starbucks

Category: Bar, Coffee

Address: y

City: Rio de Janeiro

 

Name:  Pizza Hut

Category: Restaurant, Pizza

Address: 
 
City: New York

 

and so on.

 

What we need to do:  create an "autocomplete" feature; whenever someone
starts to type, we will need to search the term BOTH on CompanyName AND
Category.
 
Example:  I type pizz

 

and the result should be coming back in 2 groups.

Group 1: Categories  (displaying  Pizza)

Group 2:  all those businesses featuring pizza on their name , ie Pizza Hut.
 
 

Right now we can not find a way to get this done.

 

Schema (since we're running a portuguese based application, there are 2
fieldType added for it):

 



 
  
-->



 



 





 

 
   


 

 
  



 



 


 


   

 

 



 



  

 


   
  


 

   




   


 


  
  
  

 

 


  
  


   



 
  

 
  



   

  







  

 

  
  
  
  
 


  
  

   
   

 
   

   

   

 

 
 LocalBusinessId
 



 

Thanks,

 

F



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Feature-design-question-use-autocomple-te-to-search-on-2-different-fields-and-return-2-different-dats-tp4017528.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Feature & design question: use autocomple?te to search on 2 different fields, and return 2 different data groups

2012-11-01 Thread fernando.beck
David,

 appreciate the suggestion.  Our current autocomplete feature is actually
working pretty good.
No perfomance issues; functionally is providing 100% results as expected.
I checked sematext and also http://www.cominvent.com; they are great, and
our budget to go get them is 0.

At this time, and given the presented schema, my question would be: is even
possible to get it done somehow? with 1 query, and "group" those results
while autocompleting on 2 different search fields?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Feature-design-question-use-autocomple-te-to-search-on-2-different-fields-and-return-2-different-dats-tp4017528p4017534.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Feature & design question: use autocomple?te to search on 2 different fields, and return 2 different data groups

2012-11-01 Thread fernando.beck
Otis, you are right: think + dev + try + test + keep iterating until it
works.
We've come up with a different approach: change the way we're thinking the
schema.

Until now we have 1 document per "business" and each business is related to
one category.

Instead, we can think that each document could be either a business OR a
category, and we could add a "docType" field.

Going this way, we'll be able to easily autocomplete on the common "name"
field , which may have either a CompanyName or a CategoryName, and group by
docType (where 1=company and 2=category).

Does that make any sense?


On Thu, Nov 1, 2012 at 6:02 PM, Otis Gospodnetic-5 [via Lucene] <
ml-node+s472066n4017663...@n3.nabble.com> wrote:

> Hi,
>
> On Thu, Nov 1, 2012 at 9:54 AM, fernando.beck <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4017663&i=0>>wrote:
>
>
> > David,
> >
> >  appreciate the suggestion.  Our current autocomplete feature is
> actually
> > working pretty good.
> > No perfomance issues; functionally is providing 100% results as
> expected.
> > I checked sematext and also http://www.cominvent.com; they are great,
> and
> > our budget to go get them is 0.
> >
>
> Not really, if you count the research, dev, troubleshoot, debug, etc.
> time.
> :)
>
>
> > At this time, and given the presented schema, my question would be: is
> even
> > possible to get it done somehow? with 1 query, and "group" those results
> > while autocompleting on 2 different search fields?
> >
>
> Hm, I checked http://wiki.apache.org/solr/FieldCollapsing to see if that
> could help, but it looks like grouping can be done on just 1 field.
> Maybe group.query could be used?
>
> Otis
> --
> Search Analytics - http://sematext.com/search-analytics/index.html
> Performance Monitoring - http://sematext.com/spm/index.html
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Feature-design-question-use-autocomple-te-to-search-on-2-different-fields-and-return-2-different-dats-tp4017528p4017663.html
>  To unsubscribe from Feature & design question: use autocomplete to
> search on 2 different fields, and return 2 different data groups, click
> here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4017528&code=ZmVybmFuZG8uYmVja0BnbWFpbC5jb218NDAxNzUyOHwxNjU3NTg0NzQx>
> .
> NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Feature-design-question-use-autocomple-te-to-search-on-2-different-fields-and-return-2-different-dats-tp4017528p4017674.html
Sent from the Solr - User mailing list archive at Nabble.com.