Sharepoint 2010 搜索 - 自动将属性添加到查询字符串
有一个棘手的问题,据我所知,还没有人真正能够解决。
这是场景。 Sharepoint 2010 企业搜索中心。
我创建了一个自定义搜索结果页面。我希望在搜索框中键入任何单词的用户仅显示用户提供的值与特定托管搜索属性匹配的结果。
现在我知道用户可以通过输入例如来搜索具有特定条件的人员 大陆:实际搜索框中的欧洲。 Sharepoint 将刷新页面,并在查询字符串中添加以下内容:k=Continent:Europe,结果将仅显示来自欧洲的人员。
所以我的问题是:如何解决此问题,以便用户不必在搜索框中输入大陆:欧洲而只需输入欧洲?
谢谢
Have a bit of a difficult question which as far as I can see, no one has really managed to fix yet.
Here's the scenario. Sharepoint 2010 EnterPrise Search Centre.
I've created a custom Search Results Page. I want people who type any word in the Search box to only display results where the Value provided by the user matches with a specific Managed Search Property.
Now I know a user can search for People with specific criteria by entering for example
Continent:Europe in the actual Search Box. Sharepoint will refresh the page with the following added to the Query String: k=Continent:Europe and the results will only show people who are from Europe.
So my question is : How can I fix this so that the user does not have to enter the Continent:Europe in the Search box and can just type Europe?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种选择是创建您自己的 Web 部件作为搜索框,并用您的自定义搜索框替换标准部件。这样做的优点是您可以更严格地控制用户界面,然后设置传递到服务器的查询(使用“k”参数)。您可以在输入的搜索词之前添加“大陆:”以帮助缩小搜索范围。
另一个用途是将 * 附加到任何搜索词上,因为人物搜索默认包含部分单词。
我们在一个网站上这样做是为了简化输入并允许用户使用一个文本框进行搜索(没有高级功能),然后用户可以使用细化来缩小搜索范围。
One option is to create your own webpart that acts as the search box and replaces the standard one with your custom search box. The advantage of this is that you can more tightly control the user interface and then set up the query passed to the server (with the "k" parameter). You could prepend "Continent:" before the search term entered to help narrow the search.
Another use for this is to append * onto any search term because the People search does include partial words by default.
We did this on one site to simplify the input and allow users to search with one text box (without the advanced features) and then users can use the refinements to narrow the search.