You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@registry.register_document
class MyDataDocument(Document):
data_json = fields.ObjectField()
def prepare_data_json(self, instance):
return instance.data_json
class Index:
name = "mydata"
settings = {"number_of_shards": 1, "number_of_replicas": 0}
class Django:
model = MyData
fields = [
"data_name",
]
But for some reason in the JSON I have data_json.form.content = '2024-24' but elastic defined this field as Date. So I get an exception during the indexing.
I wanted to define a specific mapping for this and my idea was to add a class Meta into my MyDataDocument, something like this :
I have a Document class like that :
But for some reason in the JSON I have data_json.form.content = '2024-24' but elastic defined this field as Date. So I get an exception during the indexing.
I wanted to define a specific mapping for this and my idea was to add a class Meta into my MyDataDocument, something like this :
But it does not work like this. Is it possible to define it in the Document Class ?
The text was updated successfully, but these errors were encountered: