thanks for the reply.
in which version are polygons supported?
have tried to save the following polygon in both 0.20.5 and 0.90beta(dont
know how to compile the master source).
mapping:
{
"polygon": {
"properties": {
"location": {
"type": "geo_shape"
}
}
}
}
the polygon document:
{
"location": {
"type": "polygon",
"coordinates": [
[
48.2,
17.1
],
[
48.4,
17.6
],
[
48.9,
18
],
[
49.2,
18.7
],
[
48.7,
21.3
],
[
48.2,
17.1
]
]
}
}
i get 'MapperParsingException[Failed to parse [location]]; nested:
NullPointerException
so far i havent been able to save any shape.
my use is to save a bunch of polygons and then query intersecting polygons
with a user given one.
but so far i can't make heads or tails of it
Dňa štvrtok, 14. marca 2013 14:58:54 UTC+1 Jilles van Gurp napísal(-a):
Hey,
0.90 beta is not in the best of state regarding geo_shape. I'm using a
trunk snapshot. Anything from this week will include lucene 4.2 with some
improvements regarding especially accuracy.
Another thing to be aware of is that the documentation is for stable and
somewhat outdated since there have been a change: intersects is now the
only supported relation for queries. Within no longer works.
In any case, the query looks fine except for the matchall.
Try "query":{"match_all":{}}
Jilles
On Wednesday, March 13, 2013 12:14:09 PM UTC+1, Martin Bažík wrote:
i've been using elasticsearch a few months now to index regular data. Now
i want to index some geospatial data, but can't figure it out.
i'm using elasticsearch 0.90 beta
the documents and query definition can be seen here
documents.json · GitHub
the second document and query are taken from documentation examples. i'm
not sure whether location is a required name or some special property or i
can name the field anyhow i want.
the mapping looks like this
test: {
properties: {
location: {
type: geo_shape
}
}
}
when i run the query i get a Parse Failure [Failed to parse source
[{"query":{"filtered":{"query":{"match_all":},"filter":{"geo_shape":{"location":{"shape":{"type":"envelope","coordinates":[[45,17],[49,18]]},"relation":"within"}}}}},"from":0,"size":15}]]];
nested: IllegalArgumentException[no terms provided]; }]'
geo is the name of the index. the filter must be wrong, because when i
run the query without the filter i get a list of all documents stored
what am i doing wrong and how i can fix it?
thanks
--
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.