searchboxex AppQueryTerms 枚举的有效值是多少?
我正在构建一个自定义搜索页面并尝试使用现有的自定义搜索范围。 我成功使用 SearchBoxEx 和 AppQueryTerms = "ContentType:'我的自定义内容类型名称'" 但当我尝试使用 AppQueryTerms = "Scope:'我的自定义搜索范围'" 时,我没有收到任何错误,但也没有正确的结果。 我知道我的范围是使用高级搜索填充的,所以我一定使用了 AppQuwryTerms 错误。
我在网上搜索过,但找不到允许的 AppQueryTerms 过滤器列表。 stackerverse 知道这个 Enum 吗?
I'm building a custom search page and attempting to use an existing custom search scope. I'm having success using the SearchBoxEx with the AppQueryTerms = "ContentType:'my custom content type name'" but when i try using AppQueryTerms = "Scope:'My Custom Search Scope'" I get no errors, but also no proper results. I know my scope is populated using the advanced search so I must be using AppQuwryTerms wrong.
I've searched the net over and can't find the list of allowed AppQueryTerms filters. Is this Enum know to the stackerverse?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
问题是您的范围名称有空格。
这对我有用:
The problem is your scope name has spaces.
This worked for me:
SearchBoxEx.AppQueryTerms
的值不是枚举。 它们实际上是用特定语言编写的用于 SharePoint 搜索的查询。 SharePoint 2010 的语法由 Microsoft 在此页面上定义。 它遵循格式Scope
是您的属性名称。:
是您的属性运算符使用属性存储数据库进行匹配。
我的范围
是你的适当的价值。
上面的页面指出:
因此,如 HelloSharePoint 的示例中所示,如果属性值包含空格,则必须将其括在引号中。
The values for
SearchBoxEx.AppQueryTerms
are not an enum. They're actually a query written in a specific language for SharePoint Searching. The syntax for SharePoint 2010 is defined by microsoft on this page. It follows the format<Property Name><Property Operator><Property Value>
Scope
is your property name.:
is your property operator formatching using the property store database.
My Scope
is yourproperty value.
The page above states:
Therefore, as in HelloSharePoint's example, you have to wrap the property value in quotes if it includes spaces.
您的自定义范围是否出现在网站的范围列表中?
http://intranet/[sitecollection]/_layouts/viewscopes.aspx?mode=网站
范围是否出现在显示组中?
Does your custom scope appear in the web sites list of Scopes?
http://intranet/[sitecollection]/_layouts/viewscopes.aspx?mode=site
Does the scope appear in a Display Group?