Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Can someone tell me why I need to create a raw query to be able to search with Escape()?
This brings back 0 results:
if (!string.IsNullOrEmpty(criteria.Colour)) { query = query.And().Field("colour", criteria.Colour.Escape()); }
But if I extract the RAW query and run it... It works:
string stringToParse = query.ToString(); int indexOfPropertyValue = stringToParse.IndexOf("LuceneQuery:") + 12; string rawQuery = stringToParse.Substring(indexOfPropertyValue).TrimEnd('}'); var response = index.Searcher.CreateQuery("content").NativeQuery(rawQuery).Execute(QueryOptions.SkipTake((criteria.CurrentPage - 1) * criteria.PageSize, criteria.PageSize));
Hey Aaron,
What do the two different queries look like?
Nik
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Examine Escape() does not work
Can someone tell me why I need to create a raw query to be able to search with Escape()?
This brings back 0 results:
But if I extract the RAW query and run it... It works:
Hey Aaron,
What do the two different queries look like?
Nik
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.