In the following code, KQL AND syntax is not working.
using(SPSite site = new SPSite("http://shpdev"))
using (KeywordQuery query = new KeywordQuery(site))
{
query.SelectProperties.Add("ContentType");
query.SelectProperties.Add("EntityComments");
query.QueryText = "ContentType:Performance"; // Gets the result if i use only this statement
query.QueryText = "EntityComments:excellent"; // Gets the result if i use only this statement
query.QueryText = "ContentType:Performance AND EntityComments:excellent"; // No result if i use this statement
SearchExecutor executor = new SearchExecutor();
var result = executor.ExecuteQuery(query);
foreach(DataRow row in result.First().Table.Rows)
{
Response.write(row["Title"]);
}
}
How can I use AND operator in KQL When user select different content type properties for filtering the search result


