lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Matrangolo <ugo.matrang...@gmail.com>
Subject Re: Autocomplete using facets
Date Tue, 26 Jun 2012 15:28:01 GMT
Hi Dmitry,

I have tried like you say but this will filter out any possible
'continuation' of the search query.

Let's make an example. Let's suppose we are looking for 'red rachel zoe'.
The user will type something like:

"red r"

Given that we have an autocomplete_facet facet where we copy name, brand
and color of every item we have what we do is to make this query to SOLR:

http://localhost:8765/autocomplete?q=red&facet.prefix=r

giving us the following suggestions

*red*
rachel zoe
...

Using your approach I would rather do:

http://localhost:8765/autocomplete?q=red&facet.prefix=red+r OR
http://localhost:8765/autocomplete?q=*:*&facet.prefix=red+r

getting:

red resin
red rose

overfiltering much more of what we want to do.

Cheers,
Ugo.



On Tue, Jun 26, 2012 at 4:09 PM, Dmitry Kan <dmitry.kan@gmail.com> wrote:

> Hi,
>
> Could you preserve in the facet.prefix what the user has typed so far? Or
> is this breaking your requirement?
>
> /Dmitry
>
> On Tue, Jun 26, 2012 at 5:08 PM, Ugo Matrangolo <ugo.matrangolo@gmail.com
> >wrote:
>
> > Hi,
> >
> > We are using SOLR to build a simple search engine on our e-commerce site.
> > We also implemented an autocompletion feature using faceting following
> > exactly what is described in the book 'Apache SOLR 3 Enterprise Search
> > Server' (page 221).
> >
> > What we do is that we fill an autocomplete_facet with our sku_color,
> > sku_brand and sku_taxonomy; this way an user can just type 'blac' to have
> > 'black dresses' among all the suggested terms.
> >
> > We are happy with this approach except for some minor annoyances. The
> > biggest one is that we could have repeated suggestion terms in some
> > particular cases.
> >
> > An example is when an user searches by color: if he/her types 'red r' we
> > query for everything we have that matches 'red' using a facet.prefix=r.
> > The problem is that one of these facet is again 'red' and, thus, we end
> up
> > again with 'red' as a suggested term.
> >
> > How can we filter the 'red' term ?? We can do easily this on the client
> > side but we want to keep all the filtering/boosting logic on SOLR side.
> >
> > Any suggestion ??
> >
> > Regards,
> > Ugo.
> >
>
>
>
> --
> Regards,
>
> Dmitry Kan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message