[英]Limit SharePoint search results to selectProperties
I would like to get some data using SharePoint Search REST API. 我想使用SharePoint Search REST API获取一些数据。 Using this query i get correct data:
使用此查询,我得到正确的数据:
http://mySharePoint/sites/mySiteCollection/_api/search/query?querytext='*ac*'&rowlimit=100&clienttype='ContentSearchRegular'
but I would like to limit this results to search only in few properties, something like this: Title == *ac* || Description == *ac*
但我想将此结果限制为仅在少数几个属性中进行搜索,例如:
Title == *ac* || Description == *ac*
Title == *ac* || Description == *ac*
Is this possible to manage it? Title == *ac* || Description == *ac*
这可以管理吗?
Try with this query 尝试使用此查询
http://mySharePoint/sites/mySiteCollection/_api/search/query?querytext='(Title=*ac* OR Description=*ac*)'&rowlimit=100&clienttype='ContentSearchRegular'
Download https://github.com/SharePoint/PnP-Tools/tree/master/Solutions/SharePoint.Search.QueryTool and try it yourself. 下载https://github.com/SharePoint/PnP-Tools/tree/master/Solutions/SharePoint.Search.QueryTool并自己尝试。
Ok I found what is problem. 好的,我发现了问题所在。 SharePoint Search can't handle matching patterns inside word or postfixes.
SharePoint搜索无法处理单词或后缀内的匹配模式。 It can only proceed prefixes.
它只能继续前缀。 So, searching things like abc* is available, but *abc or abc not.
因此,可以搜索诸如abc *之类的内容,但不能搜索* abc或abc 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.