Search data with special characters

Hi! I have a problem with getting data with special characters like -,+,% i have and index and my fields are like this:

"productSacCode": {
			"type": "text"
		}
"productShortDescription": {
			"fielddata": true,
			"type": "text",
			"fields": {
				"keyword": {
					"ignore_above": 256,
					"type": "keyword"
				}
			}
		}
"productSac": {
			"type": "nested",
			"properties": {
				"productSacDescription": {
					"fielddata": true,
					"type": "text",
					"fields": {
						"keyword": {
							"ignore_above": 256,
							"type": "keyword"
						}
					}
				},
				"productSacCode": {
					"fielddata": true,
					"type": "text",
					"fields": {
						"keyword": {
							"ignore_above": 256,
							"type": "keyword"
						}
					}
				}
			}
		}

i'd tried on these 2 type of fields using must and should with various queries like nested queries, wildcardqueries, etc...
Anyone know the way to searhc with special characters? i tried to scape the special characters but doesn't work

thanks in advance

could you please provide some document sample and the search result you expect for an specific search?

  • document
  • query
  • expected result

Have you looked into creating a custom analyzer that handles your specific needs?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.