Escaping characters in search

So this may be an issue with my mapping or something else.

Im using FSCrawler to crawl a index and put the docs in Elastic, that works fine the issue comes when i try and search on it, im using default FSCrawler and Elastic.

FSCrawler indexes file.url a url of where that file exists such as the example below
file://Folder1/folder2/folder3/file.ext

When i try to search on that it gives me an error about the : (i assume it thinks it part of the command not the string)

If i put the string in "" like below it works fine, but only for an exact string it wont work with a wildcard

file.url: "file:///Folder1/Folder2/Folder3/file.ext"

Anyone have any suggestions?
I want to be able to show everything in a sub folder like below.

file.url: file:///Folder1/Folder2/Folder3*

So i have come to answer my own question again the issue was the : in the path as this is used as a symbol in the query it needs to be escaped, using a \ before the special character will escape it.

If you have a windows file path C:\Folder1\Folder2\Folder3\file.ext you will also need to add a backlash between directories or elastic will try to escape the folder. Below is a correct version

file.url : C\:\\Folder1\\Folder2\\Folder3\\file.ext

Not very pretty

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