Hi, with great assistence I was able to add own synonym file to my search.
After updating the template I delete the index and use -restart to initial (as David mentioned).
The settings now looking like this:
{
"component_templates": [
{
"name": "fscrawler_settings_total_fields",
"component_template": {
"template": {
"settings": {
"index": {
"mapping": {
"total_fields": {
"limit": "2000"
}
}
}
}
}
}
},
{
"name": "fscrawler_mapping_file",
"component_template": {
"template": {
"mappings": {
"properties": {
"file": {
"properties": {
"extension": {
"type": "keyword"
},
"filename": {
"store": true,
"type": "keyword"
},
"indexed_chars": {
"type": "long"
},
"last_accessed": {
"format": "date_optional_time",
"type": "date"
},
"content_type": {
"type": "keyword"
},
"indexing_date": {
"format": "date_optional_time",
"type": "date"
},
"created": {
"format": "date_optional_time",
"type": "date"
},
"checksum": {
"type": "keyword"
},
"filesize": {
"type": "long"
},
"last_modified": {
"format": "date_optional_time",
"type": "date"
},
"url": {
"index": false,
"type": "keyword"
}
}
}
}
}
}
}
},
{
"name": "fscrawler_mapping_attributes",
"component_template": {
"template": {
"mappings": {
"properties": {
"attributes": {
"properties": {
"owner": {
"type": "keyword"
},
"group": {
"type": "keyword"
}
}
}
}
}
}
}
},
{
"name": "fscrawler_mapping_path",
"component_template": {
"template": {
"settings": {
"index": {
"analysis": {
"analyzer": {
"fscrawler_path": {
"tokenizer": "fscrawler_path"
}
},
"tokenizer": {
"fscrawler_path": {
"type": "path_hierarchy"
}
}
}
}
},
"mappings": {
"properties": {
"path": {
"properties": {
"virtual": {
"type": "keyword",
"fields": {
"tree": {
"fielddata": true,
"analyzer": "fscrawler_path",
"type": "text"
},
"fulltext": {
"type": "text"
}
}
},
"root": {
"type": "keyword"
},
"real": {
"type": "keyword",
"fields": {
"tree": {
"fielddata": true,
"analyzer": "fscrawler_path",
"type": "text"
},
"fulltext": {
"type": "text"
}
}
}
}
}
}
}
}
}
},
{
"name": "fscrawler_alias",
"component_template": {
"template": {
"aliases": {
"fscrawler": {}
}
}
}
},
{
"name": "fscrawler_mapping_meta",
"component_template": {
"template": {
"mappings": {
"dynamic_templates": [
{
"raw_as_text": {
"path_match": "meta.raw.*",
"mapping": {
"type": "text",
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
}
}
}
}
],
"properties": {
"meta": {
"properties": {
"date": {
"format": "date_optional_time",
"type": "date"
},
"altitude": {
"type": "text"
},
"keywords": {
"type": "text"
},
"modifier": {
"type": "text"
},
"latitude": {
"type": "text"
},
"rating": {
"type": "byte"
},
"description": {
"type": "text"
},
"language": {
"type": "keyword"
},
"source": {
"type": "text"
},
"title": {
"type": "text"
},
"creator_tool": {
"type": "keyword"
},
"type": {
"type": "text"
},
"relation": {
"type": "text"
},
"contributor": {
"type": "text"
},
"rights": {
"type": "text"
},
"metadata_date": {
"format": "date_optional_time",
"type": "date"
},
"longitude": {
"type": "text"
},
"coverage": {
"type": "text"
},
"identifier": {
"type": "text"
},
"comments": {
"type": "text"
},
"author": {
"type": "text"
},
"created": {
"format": "date_optional_time",
"type": "date"
},
"format": {
"type": "text"
},
"publisher": {
"type": "text"
},
"print_date": {
"format": "date_optional_time",
"type": "date"
}
}
}
}
}
}
}
},
{
"name": "fscrawler_settings_shards",
"component_template": {
"template": {
"settings": {
"index": {
"number_of_shards": "1"
}
}
}
}
},
{
"name": "fscrawler_mapping_content",
"component_template": {
"template": {
"settings": {
"index": {
"analysis": {
"filter": {
"my_synonym_filter": {
"type": "synonym",
"synonyms_path": "synonyms.txt",
"updateable": "true"
}
},
"analyzer": {
"my_synonym_analyzer": {
"filter": [
"lowercase",
"my_synonym_filter"
],
"tokenizer": "standard"
}
}
}
}
}
}
}
},
{
"name": "fscrawler_mapping_attachment",
"component_template": {
"template": {
"mappings": {
"properties": {
"attachment": {
"type": "binary",
"doc_values": false
}
}
}
}
}
}
]
}
The file synonyms.txt is stored at ..\elasticsearch\config\synonyms.txt and contains this sample:
aws, amazon web service
But it has no effect.
When I search aws I get:
EC2, **AWS** EFS, **AWS** FSx, **AWS** ALB, **AWS** NLB, **AWS** Systems Manager, **AWS** Secrets Manager, **AWS** Parameter Store
.,
But for my understanding should searching for amazon web service return at least something similar but it's complete different scoring:
**web** services, and APIs using **Web** API. )
.Proficient in **Web** Services, SOAP, XML, CSS, HTML5, AJAX and JavaScript.
.Utilized contemporary design to create concise web sites for specific client needs.
.Services (Facebook, Gmaps, Bing Maps, YouTube, Flickr, Panoramio, **Amazon** S3), etc.
Did I miss something or what can be the reason?
Thanks, Andre