I need these two functions because I only need to return fields with specific Guid The index of, and the text that exists in the text body.
Unfortunately, the Where extension method does not seem to be compatible with the Search extension method. When I combine them, I get a Lucene query like this:
p>
Query: FeedOwner:25eb541c\-b04a\-4f08\-b468\-65714f259ac2 MessageBody:<>
This seems to completely ignore the standard The’MessageBody’ part-so the constraint I used in the’free text’ is not important, it doesn’t use it.
I have tested it with’search’ alone, and it works – so It is a free text search problem in itself-just combine the two.
Query.Search( candidate => candidate.MessageBody, queryString + "*", options: SearchOptions.And);
I am executing raven query in C# and use Where() and Search () Extension method.
I need these two functions because I only need to return the index with a specific Guid field, and the text that exists in the text body.
Unfortunately, the Where extension method seems to be extended with Search The methods are not compatible. When I combine them, I get a Lucene query like this:
Query: FeedOwner:25eb541c\-b04a\-4f08\-b468 \-65714f259ac2 MessageBody:<>
This seems to completely ignore the standard’MessageBody’ part – So the constraint I used in’free text’ is not important, it doesn’t use it.
I have tested it with’search’ alone, and it works-so it is free text search in itself The question-just combine the two.
Thanks to @Tobias on Raven @GoogleGroups for pointing me in the right direction-there is an option to define Where Combination with Search clause:
Query.Search(candidate => candidate.MessageBody, queryString + "*", options: SearchOptions.And );