Solr SpatialSearch equivalent for elastic search

Hi

Is there an equivalent for SpatialSearch
(http://wiki.apache.org/solr/SpatialSearch) on Elastic Search.

I'm already using:
filter :geo_distance, location:
[params[:latitude],params[:longitude]].join(","), distance:
"#{distance_from_user}km"
&
filter :geo_bounding_box, location: {top_left:
[params[:sw_latitude],params[:sw_longitude]].join(","), bottom_right:
[params[:ne_latitude],params[:ne_longitude]].join(",")}

But I'm unable to find an equivalent for this solr query. More specifically
:pt and :sfield fields.

if latitude.present? && longitude.present?
p[:pt] = "#{latitude},#{longitude}"
p[:sfield] = :expert_location

Karan

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Karan,

I'm not very familiar with solr. So I'm not sure, what your requested
filter should handle. But it seems like you want to handle geohashes
(:sfield). These can be enabled in the mapping of the geo_point. By turning
on the geohash option you'll be able to get the geohash of a field
[location] by adressing location.geohash.

I hope this helps. Otherwise, please ask.

--Florian

On Friday, October 11, 2013 10:57:14 AM UTC+2, Karan Verma wrote:

Hi

Is there an equivalent for SpatialSearch (
SpatialSearch - Solr - Apache Software Foundation) on Elastic Search.

I'm already using:
filter :geo_distance, location:
[params[:latitude],params[:longitude]].join(","), distance:
"#{distance_from_user}km"
&
filter :geo_bounding_box, location: {top_left:
[params[:sw_latitude],params[:sw_longitude]].join(","), bottom_right:
[params[:ne_latitude],params[:ne_longitude]].join(",")}

But I'm unable to find an equivalent for this solr query. More
specifically :pt and :sfield fields.

if latitude.present? && longitude.present?
p[:pt] = "#{latitude},#{longitude}"
p[:sfield] = :expert_location

Karan

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Florian, it worked out.

On Fri, Oct 11, 2013 at 3:31 AM, Florian Schilling <
florian.schilling@elasticsearch.com> wrote:

Hi Karan,

I'm not very familiar with solr. So I'm not sure, what your requested
filter should handle. But it seems like you want to handle geohashes
(:sfield). These can be enabled in the mapping of the geo_point. By turning
on the geohash option you'll be able to get the geohash of a field
[location] by adressing location.geohash.

I hope this helps. Otherwise, please ask.

--Florian

On Friday, October 11, 2013 10:57:14 AM UTC+2, Karan Verma wrote:

Hi

Is there an equivalent for SpatialSearch (Apache Solr Wiki - Solr - Apache Software Foundation**
SpatialSearch http://wiki.apache.org/solr/SpatialSearch) on Elastic
Search.

I'm already using:
filter :geo_distance, location: [params[:latitude],params[:**longitude]].join(","),
distance: "#{distance_from_user}km"
&
filter :geo_bounding_box, location: {top_left:
[params[:sw_latitude],params[:**sw_longitude]].join(","), bottom_right:
[params[:ne_latitude],params[:**ne_longitude]].join(",")}

But I'm unable to find an equivalent for this solr query. More
specifically :pt and :sfield fields.

if latitude.present? && longitude.present?
p[:pt] = "#{latitude},#{longitude}"
p[:sfield] = :expert_location

Karan

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/Xr8YoU_SyBc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Best,
Karan

Life saving Ninja & Software Engineer

Karan pronounced Ka (http://tiny.cc/0lu61w) + Run

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.