How to do phrase search in .NET

Hi,i need to pass variable (text) to variable (query).
string query1 = “” + text+ “”; like this
// Search for the phrase ‘sollicitudin at ligula’ in text form
string text = “of the selected”;
string query1 = ““of the selected””;
SearchResult result1 = index.Search(query1);

how it is possible

1 Like

@bharathiGK,

This is how you do phrase searching:

// Search for the phrase 'theory of relativity' in text form
string query1 = "\"theory of relativity\"";
SearchResult result1 = index.Search(query1);

Please go through this documentation article in order to learn more about phrase search feature.