I'd not be able to share the document. But the "analysis" section is:
{
"index_v1": {
"aliases": {
"index": {}
},
"mappings": {
"documentum": {
"properties": {
"chronicleId": {
"type": "keyword"
},
"clicks": {
"type": "float"
},
"indexTimestamp": {
"type": "date"
},
"lastModifiedDate": {
"type": "date"
},
"link": {
"type": "keyword"
},
"objectId": {
"type": "keyword"
},
"text": {
"type": "text",
"fields": {
"stemmer": {
"type": "text",
"analyzer": "stemmer_analyzer"
}
},
"analyzer": "stopwords_synonyms_analyzer",
"search_analyzer": "standard"
},
"title": {
"type": "text",
"fields": {
"stemmer": {
"type": "text",
"analyzer": "stemmer_analyzer"
}
},
"analyzer": "stopwords_synonyms_analyzer",
"search_analyzer": "standard"
}
}
}
},
"settings": {
"index": {
"number_of_shards": "1",
"provided_name": "index_v1",
"creation_date": "1537514956420",
"analysis": {
"filter": {
"stemmer_filter": {
"type": "stemmer",
"language": "dutch"
},
"synonyms": {
"type": "synonym",
"synonyms_path": "analysis/synonym.txt"
},
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": "3",
"max_gram": "20"
},
"dutch_stopwords": {
"type": "stop",
"stopwords": [
"_dutch_"
]
}
},
"analyzer": {
"stemmer_analyzer": {
"filter": [
"lowercase",
"dutch_stopwords",
"synonyms",
"stemmer_filter"
],
"type": "custom",
"tokenizer": "standard"
},
"standard_analyzer": {
"type": "standard"
},
"stopwords_analyzer": {
"filter": [
"lowercase",
"dutch_stopwords"
],
"type": "custom",
"tokenizer": "standard"
},
"autocomplete_analyzer": {
"filter": [
"lowercase",
"dutch_stopwords",
"synonyms",
"autocomplete_filter"
],
"type": "custom",
"tokenizer": "standard"
},
"stopwords_synonyms_analyzer": {
"filter": [
"lowercase",
"dutch_stopwords",
"synonyms"
],
"type": "custom",
"tokenizer": "standard"
},
"synonyms_analyzer": {
"filter": [
"lowercase",
"synonyms"
],
"type": "custom",
"tokenizer": "standard"
}
}
},
"number_of_replicas": "0",
"uuid": "KKXxzV5hTTy6wqpRE2dhcQ",
"version": {
"created": "6020399"
}
}
}
}
}
And the query I'm doing taking in account the synonyms is:
GET /index/_search
{
"query": {
"match" : {
"text" : {
"query" : "staalwagen ac5-3967",
"analyzer": "stopwords_synonyms_analyzer",
"operator" : "and"
}
}
}
}
The document is something like that:
" xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx xxx xxxxx xxxxx xx xxxxxxx xx xxxxx xxxxx staalwagen xxxxxx
xxxxxxx/xxxxxxx
AC5-3967
..."