Hi @viktari, thank you for response.
This is the index template i am using
{
"index_templates": [
{
"name": "my-index",
"index_template": {
"index_patterns": [
"my-index*"
],
"template": {
"settings": {
"index": {
"replication": {
"type": "SEGMENT"
},
"mapping": {
"total_fields": {
"limit": "17000"
}
},
"search": {
"slowlog": {
"threshold": {
"fetch": {
"warn": "1500ms",
"debug": "1s",
"info": "1200ms"
},
"query": {
"warn": "1200ms",
"debug": "800ms",
"info": "1s"
}
}
}
},
"refresh_interval": "10m",
"number_of_shards": "4",
"auto_expand_replicas": "0-all",
"merge": {
"policy": {
"max_merge_at_once": "28",
"segments_per_tier": "3",
"floor_segment": "250mb",
"deletes_pct_allowed": "20"
}
},
"knn": "true",
"analysis": {
"filter": {
"text_general_2_autophrase_synonym_graph_filter_index": {
"expand": "true",
"type": "synonym_graph",
"synonyms_path": "custom/products/autophrase-synonyms.txt",
"lenient": "true"
},
"text_general_7_stop_filter_query": {
"ignore_case": "true",
"type": "stop",
"stopwords_path": "custom/products/stopwords.txt"
},
"text_general_5_synonym_graph_filter_query": {
"updateable": "true",
"expand": "true",
"type": "synonym_graph",
"synonyms_path": "custom/products/synonyms.txt",
"lenient": "true"
},
"text_general_2_autophrase_synonym_graph_filter_query": {
"updateable": "true",
"expand": "true",
"type": "synonym_graph",
"synonyms_path": "custom/products/autophrase-synonyms.txt",
"lenient": "true"
},
"text_general_3_stemmer_override_filter_query": {
"type": "stemmer_override",
"rules_path": "custom/products/stemdict.txt"
},
"text_general_3_stemmer_override_filter_index": {
"type": "stemmer_override",
"rules_path": "custom/products/stemdict.txt"
},
"text_general_5_word_delimiter_graph_filter_index": {
"split_on_numerics": "false",
"type_table_path": "custom/products/word-delim-types.txt",
"generate_word_parts": "true",
"preserve_original": "true",
"catenate_words": "true",
"generate_number_parts": "false",
"catenate_all": "true",
"split_on_case_change": "true",
"type": "word_delimiter_graph",
"catenate_numbers": "true"
},
"text_general_6_stop_filter_index": {
"ignore_case": "true",
"type": "stop",
"stopwords_path": "custom/products/stopwords.txt"
}
},
"char_filter": {
"text_general_1_pattern_replace_char_filter_query": {
"pattern": """((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?(?: )?(?:[x|X])(?: )?((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?""",
"type": "pattern_replace",
"replacement": "$1$2//$3$4"
},
"text_general_1_pattern_replace_char_filter_index": {
"pattern": """((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?(?: )?(?:[x|X])(?: )?((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?""",
"type": "pattern_replace",
"replacement": "$1$2//$3$4"
},
"text_general_0_pattern_replace_char_filter_query": {
"pattern": """((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?(?: )?(?:[x|X])(?: )?((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?(?: )?(?:[x|X])(?: )?((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?""",
"type": "pattern_replace",
"replacement": "$1$2//$3$4//$5$6 $1$2//$3$4 $3$4//$5$6 $1$2//$5$6"
},
"text_general_0_pattern_replace_char_filter_index": {
"pattern": """((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?(?: )?(?:[x|X])(?: )?((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?(?: )?(?:[x|X])(?: )?((?:[0-9]{1,2})|(?:[1-4]\/[2468]))(?:(?:[ -])([1-4]\/[2468]))?(?:-(?:in|ft))?""",
"type": "pattern_replace",
"replacement": "$1$2//$3$4//$5$6 $1$2//$3$4 $3$4//$5$6 $1$2//$5$6"
}
},
"normalizer": {
"product_id_concepts_normalizer": {
"filter": [
"lowercase"
],
"type": "custom"
}
},
"analyzer": {
"lowercase_analyzer": {
"filter": [
"lowercase"
],
"tokenizer": "keyword"
},
"text_general_query_analyzer": {
"filter": [
"lowercase",
"text_general_2_autophrase_synonym_graph_filter_query",
"text_general_3_stemmer_override_filter_query",
"kstem",
"text_general_5_synonym_graph_filter_query",
"text_general_7_stop_filter_query"
],
"char_filter": [
"text_general_0_pattern_replace_char_filter_query",
"text_general_1_pattern_replace_char_filter_query"
],
"tokenizer": "whitespace"
},
"text_general_index_analyzer": {
"filter": [
"lowercase",
"text_general_2_autophrase_synonym_graph_filter_index",
"text_general_5_word_delimiter_graph_filter_index",
"text_general_3_stemmer_override_filter_index",
"kstem",
"text_general_6_stop_filter_index"
],
"char_filter": [
"text_general_0_pattern_replace_char_filter_index",
"text_general_1_pattern_replace_char_filter_index"
],
"tokenizer": "whitespace"
}
}
},
"knn.derived_source": {
"enabled": "true"
}
}
},
"mappings": {
"_source": {
"excludes": [
"description_dense_vector"
]
},
"dynamic_templates": [],
"properties": {
"product_id": {
"store": "false",
"type": "keyword",
"fields": {
"concepts": {
"normalizer": "product_id_concepts_normalizer",
"store": "false",
"type": "keyword",
"doc_values": "true"
}
},
"doc_values": "true"
},
"id": {
"store": "false",
"type": "keyword",
"doc_values": "false"
},
"description_dense_vector": {
"method": {
"engine": "faiss",
"name": "hnsw",
"parameters": {
"ef_search": 170,
"ef_construction": 256,
"encoder": {
"name": "sq"
},
"m": 32
}
},
"space_type": "cosinesimil",
"type": "knn_vector",
"dimension": 768
},
"description": {
"search_analyzer": "text_general_query_analyzer",
"position_increment_gap": "100",
"analyzer": "text_general_index_analyzer",
"store": "false",
"type": "text"
},
"multifield_text": {
"type": "text"
}
}
}
},
"composed_of": []
}
}
]
}