I want to support two types of text searches:
- Regex search (
word.*
) - Partial match search (
prv
would foundprvln
and etc)
I have this index schema:
{
"analyzer": "lucene.standard",
"mappings": {
"dynamic": false,
"fields": {
"source": {
"analyzer": "standardLowerer",
"multi": {
"keywordAnalyzer": {
"analyzer": "keywordLowerer",
"type": "string"
}
},
"type": "string"
}
}
},
"analyzers": [
{
"charFilters": [
{
"ignoredTags": [],
"type": "htmlStrip"
},
{
"mappings": {
"\"": " ",
"'": " ",
"`": " ",
"‘": " ",
"’": " ",
"“": " ",
"”": " ",
"„": " "
},
"type": "mapping"
}
],
"name": "standardLowerer",
"tokenFilters": [
{
"type": "lowercase"
}
],
"tokenizer": {
"type": "standard"
}
},
{
"charFilters": [
{
"ignoredTags": [],
"type": "htmlStrip"
},
{
"mappings": {
"\"": " ",
"'": " ",
"`": " ",
"‘": " ",
"’": " ",
"“": " ",
"”": " ",
"„": " "
},
"type": "mapping"
}
],
"name": "keywordLowerer",
"tokenFilters": [
{
"type": "lowercase"
}
],
"tokenizer": {
"type": "keyword"
}
}
],
"synonyms": []
}
The problem here is that it works but finds only by a full word. Any suggestions on what should I update in my index?