I’m creating an IQuery and I want to make sure that only a subset of documents are searched:
query.Field("path", parent.Path.MultipleCharacterWildcard());
This translates to +(path:-1,1230,1242,1318,1319*) +topicTextContent:"test test"
when I call query.ToString()
.
When I execute the query in code I get 0 results. But when I copy/paste the Lucene query to the Examine tab in the Umbraco backoffice I will get the desired results. The only thing I had to do was add a \
before -1, because the -
character needs to be escaped.
I’ve tried to add the backslash before the path so now the Lucene query is exactly the same, but still no results.
query.Field("path", "\\" + parent.Path.MultipleCharacterWildcard());
Did I encounter a bug in Examine or did I do something wrong?