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 William Bell <bi...@gmail.com> on 2015/11/09 20:18:38 UTC

Solr Suggester with Geo?

http://lucidworks.com/blog/solr-suggester/


Wondering if anyone has uses these new techniques with a boost on
geodist() inverted? So the rows that get returned that are closest
need to come back first.


We are still using Edge Grams since we have not figured out how to
boost the results on geo spatial.


Anyone have thoughts?




-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076

Re: Solr Suggester with Geo?

Posted by Alessandro Benedetti <ab...@apache.org>.
Out of the box the Suggester componenent provides a set of Lookup
implementation to look for the suggestions from the dictionary selected.
Most of the suggestion lookups are FST based ( except the Analysing Infix
one , that relies on an external auxiliary Lucene Index) .

Depending on your requirement you should customise the lookUp
implementation to score the suggestions taking in consideration the
distance.
Customising the "Auxiliary Lucene Index " based look up strategies would be
easier.
Playing with the FST look up would be much more complicated.

Cheers

On 9 November 2015 at 20:16, Sameer Maggon <sa...@measuredsearch.com>
wrote:

> Looking through the code and some example Suggesters, it seems that
> theoretically, one can write a GeoSuggester and provide that as the Lookup
> implementation (lookupimpl) that would factor in the geo score or extend
> the SolrSuggestor to support spatial extensions in the same spirit as
> "Filters" are supported today.
>
> Sameer.
>
> On Mon, Nov 9, 2015 at 11:47 AM, William Bell <bi...@gmail.com> wrote:
>
> > Yeah we have that working today. But the issue is we want to use
> > http://lucidworks.com/blog/solr-suggester/
> >
> > And you cannot do a boost with that right?
> >
> >
> >
> > On Mon, Nov 9, 2015 at 12:41 PM, Sameer Maggon <
> sameer@measuredsearch.com>
> > wrote:
> >
> > > Have you looked at the Spatial extensions for Solr? If you are indexing
> > > Lat/Lon along with your documents, you can compute the distance from
> the
> > > origin & use that distance as one of the boost factors to affect the
> > score.
> > > Typically, use cases around that combine the geo score with other
> factors
> > > as a pure sort by geo score might not give you the relevant results.
> > >
> > > e.g. typing to search for "sushi restaurants" near Santa Monica, CA -
> you
> > > might not want "thai restaurants" that are closest to you. (Local
> Search
> > > use case)
> > >
> > > https://cwiki.apache.org/confluence/display/solr/Spatial+Search
> > >
> > > Thanks,
> > > --
> > > *Sameer Maggon*
> > > www.measuredsearch.com <http://measuredsearch.com/>
> > > Fully Managed Solr-as-a-Service | Solr Consulting | Solr Support
> > >
> > >
> > >
> > > On Mon, Nov 9, 2015 at 11:18 AM, William Bell <bi...@gmail.com>
> > wrote:
> > >
> > > > http://lucidworks.com/blog/solr-suggester/
> > > >
> > > >
> > > > Wondering if anyone has uses these new techniques with a boost on
> > > > geodist() inverted? So the rows that get returned that are closest
> > > > need to come back first.
> > > >
> > > >
> > > > We are still using Edge Grams since we have not figured out how to
> > > > boost the results on geo spatial.
> > > >
> > > >
> > > > Anyone have thoughts?
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Bill Bell
> > > > billnbell@gmail.com
> > > > cell 720-256-8076
> > > >
> > >
> >
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Re: Solr Suggester with Geo?

Posted by Sameer Maggon <sa...@measuredsearch.com>.
Looking through the code and some example Suggesters, it seems that
theoretically, one can write a GeoSuggester and provide that as the Lookup
implementation (lookupimpl) that would factor in the geo score or extend
the SolrSuggestor to support spatial extensions in the same spirit as
"Filters" are supported today.

Sameer.

On Mon, Nov 9, 2015 at 11:47 AM, William Bell <bi...@gmail.com> wrote:

> Yeah we have that working today. But the issue is we want to use
> http://lucidworks.com/blog/solr-suggester/
>
> And you cannot do a boost with that right?
>
>
>
> On Mon, Nov 9, 2015 at 12:41 PM, Sameer Maggon <sa...@measuredsearch.com>
> wrote:
>
> > Have you looked at the Spatial extensions for Solr? If you are indexing
> > Lat/Lon along with your documents, you can compute the distance from the
> > origin & use that distance as one of the boost factors to affect the
> score.
> > Typically, use cases around that combine the geo score with other factors
> > as a pure sort by geo score might not give you the relevant results.
> >
> > e.g. typing to search for "sushi restaurants" near Santa Monica, CA - you
> > might not want "thai restaurants" that are closest to you. (Local Search
> > use case)
> >
> > https://cwiki.apache.org/confluence/display/solr/Spatial+Search
> >
> > Thanks,
> > --
> > *Sameer Maggon*
> > www.measuredsearch.com <http://measuredsearch.com/>
> > Fully Managed Solr-as-a-Service | Solr Consulting | Solr Support
> >
> >
> >
> > On Mon, Nov 9, 2015 at 11:18 AM, William Bell <bi...@gmail.com>
> wrote:
> >
> > > http://lucidworks.com/blog/solr-suggester/
> > >
> > >
> > > Wondering if anyone has uses these new techniques with a boost on
> > > geodist() inverted? So the rows that get returned that are closest
> > > need to come back first.
> > >
> > >
> > > We are still using Edge Grams since we have not figured out how to
> > > boost the results on geo spatial.
> > >
> > >
> > > Anyone have thoughts?
> > >
> > >
> > >
> > >
> > > --
> > > Bill Bell
> > > billnbell@gmail.com
> > > cell 720-256-8076
> > >
> >
>

Re: Solr Suggester with Geo?

Posted by William Bell <bi...@gmail.com>.
Yeah we have that working today. But the issue is we want to use
http://lucidworks.com/blog/solr-suggester/

And you cannot do a boost with that right?



On Mon, Nov 9, 2015 at 12:41 PM, Sameer Maggon <sa...@measuredsearch.com>
wrote:

> Have you looked at the Spatial extensions for Solr? If you are indexing
> Lat/Lon along with your documents, you can compute the distance from the
> origin & use that distance as one of the boost factors to affect the score.
> Typically, use cases around that combine the geo score with other factors
> as a pure sort by geo score might not give you the relevant results.
>
> e.g. typing to search for "sushi restaurants" near Santa Monica, CA - you
> might not want "thai restaurants" that are closest to you. (Local Search
> use case)
>
> https://cwiki.apache.org/confluence/display/solr/Spatial+Search
>
> Thanks,
> --
> *Sameer Maggon*
> www.measuredsearch.com <http://measuredsearch.com/>
> Fully Managed Solr-as-a-Service | Solr Consulting | Solr Support
>
>
>
> On Mon, Nov 9, 2015 at 11:18 AM, William Bell <bi...@gmail.com> wrote:
>
> > http://lucidworks.com/blog/solr-suggester/
> >
> >
> > Wondering if anyone has uses these new techniques with a boost on
> > geodist() inverted? So the rows that get returned that are closest
> > need to come back first.
> >
> >
> > We are still using Edge Grams since we have not figured out how to
> > boost the results on geo spatial.
> >
> >
> > Anyone have thoughts?
> >
> >
> >
> >
> > --
> > Bill Bell
> > billnbell@gmail.com
> > cell 720-256-8076
> >
>



-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076

Re: Solr Suggester with Geo?

Posted by Sameer Maggon <sa...@measuredsearch.com>.
Have you looked at the Spatial extensions for Solr? If you are indexing
Lat/Lon along with your documents, you can compute the distance from the
origin & use that distance as one of the boost factors to affect the score.
Typically, use cases around that combine the geo score with other factors
as a pure sort by geo score might not give you the relevant results.

e.g. typing to search for "sushi restaurants" near Santa Monica, CA - you
might not want "thai restaurants" that are closest to you. (Local Search
use case)

https://cwiki.apache.org/confluence/display/solr/Spatial+Search

Thanks,
-- 
*Sameer Maggon*
www.measuredsearch.com <http://measuredsearch.com/>
Fully Managed Solr-as-a-Service | Solr Consulting | Solr Support



On Mon, Nov 9, 2015 at 11:18 AM, William Bell <bi...@gmail.com> wrote:

> http://lucidworks.com/blog/solr-suggester/
>
>
> Wondering if anyone has uses these new techniques with a boost on
> geodist() inverted? So the rows that get returned that are closest
> need to come back first.
>
>
> We are still using Edge Grams since we have not figured out how to
> boost the results on geo spatial.
>
>
> Anyone have thoughts?
>
>
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076
>

Re: Solr Suggester with Geo?

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello,

It seems it's nearly possible, but needs to be done
https://github.com/apache/lucene-solr/blob/trunk/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java#L576
(this is for AnalyzingInfixLookupFactory)

And for FuzzySuggester such implementation is much more complicated.


On Mon, Nov 9, 2015 at 10:18 PM, William Bell <bi...@gmail.com> wrote:

> http://lucidworks.com/blog/solr-suggester/
>
>
> Wondering if anyone has uses these new techniques with a boost on
> geodist() inverted? So the rows that get returned that are closest
> need to come back first.
>
>
> We are still using Edge Grams since we have not figured out how to
> boost the results on geo spatial.
>
>
> Anyone have thoughts?
>
>
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>