Full-text search – RavendB that combines with WHERE

I am executing a raven query in C# and using the Where() and Search() extension methods.
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:

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.

thanks Raven @ @Tobias on GoogleGroups pointed me in the right direction-there is an option to define the combination of Where and Search clauses:

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 );

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2728 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.