Phrase proximity with simple_query_string and NEST

I'm using the simple_query_string with the tilde ~ operator to specify proximity between words in a phrase, and it works. The simple query has other functions that match doesn't provide.


                  "query":"\"small demonstration\"~10",

But, using "small demonstration"~10 or "\"small demonstration\"~10" in an equivalent NEST query doesn't add proximity search.

    m => m
		.SimpleQueryString(s => s
						.Query("small demonstration"~10)
						.Fields(f => f

There can be multiple phrases using double-quotes, "phrase-1" other words "phrase-2". Can I add the tilde character to single or multiple phrases with NEST using the simple_query_string?

In the Fields method, at least one field needs to be specified.

.Fields(f => f

When the field array is empty, Elastic searches through all the fields, but it seems that it doesn't make use of the proximity character.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.