I am new in Elastic search.I define a mongoose schema in node.js where I add a field 'location' to store the longitude and latitude value like-
location: { "type": "geo_point" }
and Mongoosastic plugin
schema.plugin(mongoosastic, {
hosts: [
'localhost:9200'
]
});
While I adding location: { "type": "geo_point" } this line i get an error
throw new TypeError('Undefined type
' + name + '
at `' + path + ^TypeError: Undefined type
Geo_point
atlocation
Did you try nesting Schemas? You can only nest using refs or arrays.
How to fix the error and solve the problem.
via Santu Nandi
No comments:
Post a Comment