Hello,

We are working on a project that will use Elastic Search for search.
We do not have previous experience with it, but verry little using Solr.
I have some problems with Geo Localization for search, with which i never 
had any contact in the past.
I will try to put thinks simple so i can ask specific questions:

Current situation:
----------------------

1. Data structure of a document, indexed into ES:

{
...........................
    "location" : {
        "type" : "point",
        "coordinates" : [-67.97224, -38.94410]
    },
    "Latitude" : "-38.94410",
    "Longitude" : "-67.97224",
.............................
}'

2. ES mappings for Geo Localization
........................
        "location" : {
            "type": "geo_shape",
            "tree": "geohash",
            "precision": "1m"
        }
.............................

3. Query that i try to use to find all documents within a rectangle defined 
by coordinates; something like this is what we think we need to search 
nearby documents, geographically near other documents:

curl -XPOST 
"http://10.0.30.99:9200/_search?pretty";<http://10.0.30.99:9200/_search?pretty>-d'
{
    "query":{
        "filtered": {
            "query": {
                "match_all": {}
            },
            "filter": {
                "geo_shape": {
                    "location": {
                        "shape": {
                            "type": "envelope",
                            "coordinates" : [[-59.0, -35.0], [-58.0, -34.0]]
                        }
                    }
                }
            }
        }
    }
}'

And i get an error from ES:

..................................
 nested: InvalidShapeException[maxY must be >= minY: -34.0 to -35.0]
.......................................

4. Questions

a. At error from point 3, from what i understand ES complains that -34.0 
must be greater or equal to -35, which is the case (they are negative 
numbers), so why does ES complain ? Is this query ok ?
b. Is the approach used to find documents which are geographically near 
other documents, that we used ok, and what fixes, improvements, 
alternatives do you suggest ?
c. Could you recommend a good reference documentation/help/tutorial for GEO 
localization (but not only) in ES  ?

Thank you !

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1b93a23b-9909-46de-ab56-85882358d547%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to