Hi everyone, 

I currently have a problem with geo_shape data 

I have the following mapping : 

"mappings": {
      "street": {
            "properties": {
                "countrySubdivision": {
                    "type": "string"
                },
                "municipalitySubdivision": { 
                    "type": "string"
                },
                
                ...

                



*"geom": {                    "type": "geo_shape",                    
"tree": "quadtree",                    "precision": "1m"                }*
            }
        }
    }

I indexed my data and made some queries (directly through ElasticSearch 
API) to test the mapping and it gave me good results :

         {
            "_index": "beladdress",
            "_type": "street",
            "_id": "AUxbKUAzu9vYuuKJN8Ez",
            "_score": 4.6158404,
            "_source": {
               "countrySubdivision": "Vlaanderen",
               "municipalitySubdivision": "Ronse"

               










*"geom": {                  "type": "multipoint",                  
"coordinates": [                     [                        
50.75176461434321,                        3.6213774507672163                
     ],                     [                        50.7517381346342,      
                  3.6214543962345838                     ],                 
     ...*
}

The problem is : When I try to get the content of the fields through the 
Java API, It work for every fields *except for geom* that returns a Null 
pointer exception :

When I create my query, I make sure to ask ElasticSearch to return every 
field I need :

....addFields("id", "label", "municipalitySubdivision", ... , "*geom*")

Then I try to get the value of each field.

...
hit.field("municipalitySubdivision").getValue() => working
hit.field("geom").getValue() => Null Pointer Exception
...

Has anyone ever encountered this problem ? : )

-- 
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/322b3f88-9a1b-4456-9916-d398d11a993e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to