Seaching is not working fine

can anyone please let me know why i am getting count difference

1. This code given 4 record 

#set ($searchQuery = "%{}")
#set($query = "community && type:blog && section:1546" )
$searchQuery.Add("Query", $query)
$searchQuery.Add("PageSize", 15)
#set($results = $core_v2_searchResult.List("%{ Query = $query, PageSize = $pageSize}"))
count $results.TotalCount

Below code gives zero record

#set ($searchQuery = "%{}")
#set($query = "comm && type:blog && section:1546" )
$searchQuery.Add("Query", $query)
$searchQuery.Add("PageSize", 15)
#set($results = $core_v2_searchResult.List("%{ Query = $query, PageSize = $pageSize}"))
count $results.TotalCount

Parents
  • Stemming. Its doubtful that "comm" term is stored in the index. You could append a wildcard to the end of the term but not that will be a more expensive query and also have gaps for stemmed terms. Community is stemmed to "commun" to catch "community" and "communities". There are some techniques to get performant searches for the "comm" scenario you wrote but they are typically targeted for things like suggestions and lookups and not site searches. The techniques also ultimately expect/depend on the final intent, in this case "community" to give relevant results.

Reply
  • Stemming. Its doubtful that "comm" term is stored in the index. You could append a wildcard to the end of the term but not that will be a more expensive query and also have gaps for stemmed terms. Community is stemmed to "commun" to catch "community" and "communities". There are some techniques to get performant searches for the "comm" scenario you wrote but they are typically targeted for things like suggestions and lookups and not site searches. The techniques also ultimately expect/depend on the final intent, in this case "community" to give relevant results.

Children
No Data