簡體   English   中英

優化搜索結果

[英]Refine search results

我正在使用SharePoint其余搜索API。

我要它返回給我一組特定的結果。

當前,它在名為myfield的字段中搜索。 myfield是一個多選字段。 我正在搜索以返回myfield等於a的結果。 如果包含(myfield = a; b; c)並且僅等於(myfield = a),則返回結果。

但是,我希望它返回僅等於a的結果。 因此,如果返回等於a的結果,則不返回結果,也返回其他結果。

我當前使用的查詢是:

http://testurl.com/Sites/mysite/_api/search/query?querytext='(Country:FRA)(ContentType:mycontenttype)(myfield:a)'&rowlimit=50&SelectProperties='Title,LastModifiedTime,myfield'&trimduplicates=false&sortlist='LastModifiedTime:descending'

我試圖選擇優化過濾器無濟於事:

http://testurl.com/Sites/mysite/_api/search/query?querytext='(Country:FRA)(ContentType:mycontenttype)(myfield:a)'&rowlimit=50&SelectProperties='Title,LastModifiedTime,myfield'&trimduplicates=false&sortlist='LastModifiedTime:descending'&refinementfilters='myfield:equals("AMER")'

您是否嘗試過使用KQL? 似乎可以使用“ =”代替“:”。

":"
Returns results where the value specified in the property restriction is equal to the property value that is stored in the Property Store database, or matches individual terms in the property value that is stored in the full-text index.


"="
Returns search results where the property value is equal to the value specified in the property restriction.
Note
We do not recommend combining the = operator together with asterisk (*) when you do exact matching.

https://msdn.microsoft.com/zh-CN/library/office/ee558911.aspx

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM