I'm using Lucene.Net 2.9.2.I use StandardAnalyzer with customized stop words list that just including english stop words.My data includes folder path like"questions\text\testing data". It's ok when indexing and searching for that folder path. However, I'm using QueryPaser and make query using with Standard Analyzer with the same in indexing. The query parser strips out backslash and change lower case. So I used escape character '\',it does not work.The following are my testing code.
QueryParser queryParser=new QueryParser("",new StandardAnalyzer(STOP_WORDS)); Query query=queryParser.Parse("+Field1:questions\text\testing data +(Field2:good)");
The query syntax change "+Field1:"questionstexttesting" data+(Field2:good".
folder path=questions\text\testing data search text =good
In my application,I could not know which fields will come to search. Firstly, I search that a word and save the search with lucene query syntax. Later I reuse the search and pass with QueryParser. Thank in advance for any advice!