I need to set "type" : "wildcard" in mappings.
I have learnt that wildcard is added as a new feature to Elasticsearch 7.9.
However, I need to use x-pack in order to use this feature.
There are limited documents for learning how to use x-pack.
Can someone help to with it?
Thanks in advance!!
from Elasticsearch import Elasticsearch
from elasticsearch_xpack import XPackClient
es = Elasticsearch('http://localhost:9200')
XPackClient.infect_client(es)
def indexing(file_dir):
mapping = {
"mappings": {
"properties":{
"text": {"type": "text"},
"parsed_text": {"type": "wildcard"}
}
}
}
print(INDEX_NAME)
es.indices.create(index=INDEX_NAME, body=mapping)
The above code issues error:
"No handler for type [wildcard] declared on field"