Unable to get geosearches to work


(lotrak) #1

Hi,

I've been trying to get the geosearches to work, but to no avail.

I've summarized what I've done so far in this gist.

I'm using ES 0.16.2.

I'm quite new to the world of ES / lucene, so I've probably messed up. Can
anyone point me in the right direction?

thanks in advance

lotrak


(Clinton Gormley) #2

Hi Christofer

I've summarized what I've done so far in this gist.

https://gist.github.com/1004487

Nice gist++

You're searching on the wrong field. Your field name is 'pin' not
'location'

clint


(lotrak) #3

2011/6/2 Clinton Gormley clinton@iannounce.co.uk

Hi Christofer

I've summarized what I've done so far in this gist.

https://gist.github.com/1004487

Nice gist++

You're searching on the wrong field. Your field name is 'pin' not
'location'

clint

I tried using "pin.location" as on the es-web (
http://www.elasticsearch.org/guide/reference/query-dsl/geo-distance-filter.html),
but it got me: "QueryParsingException[[twitter] failed to find geo_point
field [pin.location]]; }]","status":500}"

Alas, I get the same exception for 'pin' :frowning:

lotrak


(Shay Banon) #4

Several problems, the mapping definition is incorrect, and the query for 20km is not enough in terms of distance to include the relevant point. Here is a gist with the correct mapping: https://gist.github.com/1004704.

On Thursday, June 2, 2011 at 6:49 PM, Christofer Wallén wrote:

2011/6/2 Clinton Gormley <clinton@iannounce.co.uk (mailto:clinton@iannounce.co.uk)>

Hi Christofer

I've summarized what I've done so far in this gist.

https://gist.github.com/1004487

Nice gist++

You're searching on the wrong field. Your field name is 'pin' not
'location'

clint

I tried using "pin.location" as on the es-web (http://www.elasticsearch.org/guide/reference/query-dsl/geo-distance-filter.html), but it got me: "QueryParsingException[[twitter] failed to find geo_point field [pin.location]]; }]","status":500}"

Alas, I get the same exception for 'pin' :frowning:

lotrak


(lotrak) #5

Thanks for the rapid response guys! You rock!

I knew i was missing something crucial. I thought adding 'tweet' to the url
would let me omit it from postbody. Changing the mapping according to the
gist is making my day.

Christofer

2011/6/2 Shay Banon shay.banon@elasticsearch.com

Several problems, the mapping definition is incorrect, and the query for
20km is not enough in terms of distance to include the relevant point. Here
is a gist with the correct mapping: https://gist.github.com/1004704.

On Thursday, June 2, 2011 at 6:49 PM, Christofer Wallén wrote:

2011/6/2 Clinton Gormley clinton@iannounce.co.uk

Hi Christofer

I've summarized what I've done so far in this gist.

https://gist.github.com/1004487

Nice gist++

You're searching on the wrong field. Your field name is 'pin' not
'location'

clint

I tried using "pin.location" as on the es-web (
http://www.elasticsearch.org/guide/reference/query-dsl/geo-distance-filter.html),
but it got me: "QueryParsingException[[twitter] failed to find geo_point
field [pin.location]]; }]","status":500}"

Alas, I get the same exception for 'pin' :frowning:

lotrak


(system) #6