I have a question regarding a query.
I have a file named 'file121.docx', I am using the following query to search for the file:
GET demoindex/_search
{
"_source": "documentName",
"query": {
"regexp": {
"documentName":{
"value": "file121.docx"
}
}
}
}
The query above does not return a result?
However when I run the query with a wildcard like so it returns the file?
GET demoindex/_search
{
"_source": "documentName",
"query": {
"regexp": {
"documentName":{
"value": "file121.*"
}
}
}
}
When I run the same query with the full file name against another file from the list of files in my elastic search index it returns the result fine...
For Example:
GET demoindex/_search
{
"_source": "documentName",
"query": {
"regexp": {
"documentName":{
"value": "yjmnsdfs.exe"
}
}
}
}
It seems to be an issue with files that contain numeric characters in the filename?
Does anybody have a solution for this?