为什么 Windows 资源管理器无法正确显示除 text/html 之外的其他类型的 OpenSearch 结果?
我正在尝试通过其 OpenSearch 集成在 Windows 7 资源管理器中显示来自 IBM Content Analytics 的 REST API 的结果。 REST API 针对每个搜索命中返回一个 Atom 提要,其中包含
元素。
我的问题是:一旦元素的
的 type
属性具有 text/html
以外的值, Windows 资源管理器中的相应搜索结果显示为“无可用信息”。在下面的最小示例中,只要删除 type="application/msword"
或将其值更改为 text/html
,搜索命中就会正确显示。
<atom:entry>
<atom:title>Hit B</atom:title>
<atom:link rel="alternate" type="application/msword" href="http://192.168.111.130:8394/api/v10/document/content?collection=Search&uri=file:///C:/DataFiles/Price%2BChange.doc" hreflang="en"/>
<atom:id>file:///C:/DataFiles/Price+Change.doc</atom:id>
<atom:summary>...B</atom:summary>
</atom:entry>
任何人都可以解释此行为或说明如何避免它并在 Windows 资源管理器中显示非 text/html
结果吗?
文档似乎很少,我找到的大部分内容都在下面链接的两个文档中,但我在那里没有找到有关此问题的任何内容。
I'm trying to display results from the REST API of IBM Content Analytics in Windows 7 Explorer through its OpenSearch integration. The REST API returns an Atom feed with an <atom:entry>
element for each search hit.
My problem is: As soon as the type
attribute of an element's <atom:link>
has a value other than text/html
, the respective search hit in Windows explorer is displayed as "No information available". In the below minimal example, the search hit is displayed correctly as soon as you remove the type="application/msword"
or change its value to text/html
.
<atom:entry>
<atom:title>Hit B</atom:title>
<atom:link rel="alternate" type="application/msword" href="http://192.168.111.130:8394/api/v10/document/content?collection=Search&uri=file:///C:/DataFiles/Price%2BChange.doc" hreflang="en"/>
<atom:id>file:///C:/DataFiles/Price+Change.doc</atom:id>
<atom:summary>...B</atom:summary>
</atom:entry>
Can anyone explain this behaviour or say how to avoid it and display non-text/html
results in Windows Explorer?
Documentation seems scarce, most of the stuff I found was in the two documents linked below, but I didn't find anything on this issue there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在RSS中,链接标签需要包含一个URLeg,
然后在文件管理器中显示标题、日期等。
相反,
会在文件管理器中显示“没有可用信息”。
对于 ATOM,您需要包括:
不带任何“rel”属性。然后你就可以在文件管理器中看到正确的信息了!
In RSS, the link tag needs to contain a URL e.g.
Then the title, date, etc. are displayed in the file manager.
Instead
would show "No information available" in the file manager.
For ATOM, you need to include:
without any "rel" attribute. Then you see the correct information in the file manager!