Closed hellosteadman closed 8 years ago
I could be wrong, but I think you need something like:
"name": { "type": "string" },
in the mappings:
Hello, the 'completion' type field is automatically added by django-elasticsearch so @apollodatasolutions answer's is correct, you shouldn't add it in your mappings, only in completion_fields
. Note that it will appear in the mappings as name__suggest
(this is a convention).
I've a model whose
Elasticsearch
class looks like this:When running
model.es.complete('name', q)
(whereq
is a string) I get a very long and verbose error from Elasticsearch that boils down to the following (repeated 5 times):As far as I can tell, everything's defined correctly. I've tried reindexing, but always end up with the same error. Using the latest version from Git - at the time of writing - of this package, 1.9.0 of the Python package and 1.7.2 of the server. Any pointers as to where I might be going wrong would be helpful, if this isn't an issue with the library.