I am totally new to elastic search. So please forgive me if this is a stupid Question and my Questions might have been answered somewhere else already but I couldn't find it. I want to use Elastic Search as a search engine for PDF'S and docx's in my network. I used fscrawler to ingest the PDF's to elastic search. Since the documents I want to ingest are in several languages I wanted to use n-graming for stemming. To do so I wanted to update my mapping like this
PUT test/_mappings/_all
{
"mappings": {
"title": {
"properties": {
"title": {
"type": "text",
"fields": {
"de": {
"type": "string",
"analyzer": "german"
},
"en": {
"type": "string",
"analyzer": "english"
},
"general": {
"type": "string",
"analyzer": "trigrams"
}
}
}
}
}
}
}
And now I get this Errormessage
{ "error": { "root_cause": [ { "type": "mapper_parsing_exception", "reason": "Root mapping definition has unsupported parameters: [mappings : {title={properties={title={type=text, fields={de={type=string, analyzer=german}, en={type=string, analyzer=english}, general={type=string, analyzer=trigrams}}}}}}]" } ], "type": "mapper_parsing_exception", "reason": "Root mapping definition has unsupported parameters: [mappings : {title={properties={title={type=text, fields={de={type=string, analyzer=german}, en={type=string, analyzer=english}, general={type=string, analyzer=trigrams}}}}}}]"
}, "status": 400 }
Do you have any idea how i can fix this? Or do you have an idea how I can ingest the files with the right mapping without using fscrawler?
trigrams
is not a inbuilt analyzer in ES, follow this elastic.co/guide/en/elasticsearch/guide/current/… to define trigrams and then create the mapping. – user156327_mapping
api . refer elastic.co/guide/en/elasticsearch/reference/current/… on how to use it – user156327fscrawler
– user156327