Contains in Keyword Query Language SharePoint 2010
-
06-01-2021 - |
Pergunta
I have SharePoint 2010 list where items are stored names of cities. The field CityName is managed property. I compiled query using KQL with query text:
query.QueryText = String.Format("CityName:\"*{0}*\", cityName);
I use
*
for searching city by part of word. But when a try search Washington by
wash
it is ok, but by
ington
no results.
I did something wrong?
Solução
As per Microsoft, "Prefix matching is also supported with phrases specified in property values, but you must use the wildcard operator (*) in the query, and it is supported only at the end of the phrase"
So your 1st query works but not second
Reference link - KQL
Look under header - 'Property values in the full-text index'
Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange