当我在Google Chrome多功能框中输入一些网址时,我会看到其中的消息"按TAB键搜索$ URL".例如,有一些俄罗斯网站habrahabr.ru或yandex.ru.当您按TAB键时,您将能够在该站点中搜索,而不是在搜索引擎中搜索.如何让我的网站能够做到这一点?也许,我需要在我的网站页面中写一些特殊代码?
我正在为Firefox/IE构建一个开放的搜索插件,并且图像需要是Base64编码的,那么我如何能够对我所拥有的图标进行64编码?
我只熟悉PHP
我想从Chrome的Omnibox中搜索JIRA的"快速搜索".这与此Chrome Omnibox搜索字符串不同:
https://myserver/jira/browse/%s
Run Code Online (Sandbox Code Playgroud)
该字符串只会打开完美(非部分)匹配的JIRA ID.即使搜索条件是部分匹配,快速搜索也会自动打开与搜索条件唯一匹配的问题.例如,考虑一个系统,其中只有一个JIRA问题包含-77,而JIRA问题是CLS-77.使用快速搜索(在JIRA站点的右上角)搜索"77"将自动打开问题CLS-77.通过我在前面列出的Chrome Omnibox自定义搜索字符串执行相同的搜索,在搜索77时不会启动CLS-77.
从 Elasticsearch 切换到 Opensearch 后,我的应用程序现在无法使用以下命令运行简单查询:
“文本字段没有针对需要每个文档字段数据的操作(例如聚合和排序)进行优化,因此默认情况下禁用这些操作。请改用关键字字段。或者,在 [status] 上设置 fielddata=true 以便加载字段通过反转倒排索引来恢复数据。请注意,这可能会使用大量内存。”
在Searchkick / Elasticsearch Error: Please use a keywords field 相反,有一个关于相同错误的问题。或者,在 [name] 上设置 fielddata=true,但问题仅影响测试,并且我仅在开发模式下遇到问题(到目前为止)。
这是正在运行的查询:
::Record.search(q ? q : "*",
where: where_clause,
fields: fields,
match: :word_middle,
per_page: max_per_page(per_page) || 30,
page: page || 1,
order: sort_clause,
aggs: aggs,
misspellings: {below: 5}
Run Code Online (Sandbox Code Playgroud)
如果我取出 aggs,那么搜索就可以了,但它们对于应用程序来说是必不可少的。:status
从聚合字段列表中删除会导致错误将数组中的下一个字段命名为问题。因此,我可能需要为聚合中使用的每个字段指定正确的类型。但如何呢?
Searchkick 文档在“高级映射”( https://github.com/ankane/searchkick ) 下建议使用此示例:
class Product < ApplicationRecord
searchkick mappings: {
properties: {
name: {type: "keyword"}
}
}
end
Run Code Online (Sandbox Code Playgroud)
所以,我尝试了这个:
# in …
Run Code Online (Sandbox Code Playgroud) 我认为标题解释了这一切,但我还是更深入地研究了我的问题:
如何在我的网站上使用Chrome的Omnibox [TAB]功能?
由于许多用户要求我在网站上实现该功能,我对OpenSearchDescription进行了研究,并且在使用FireFox和IE7/IE8搜索栏时非常成功.
然而,实施对Chrome Omnibox [TAB]功能并不起作用.
你能帮帮我吗?
我的OSD.xml代码:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>MySite</ShortName>
<Description>My Site</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://MySite.com/favicon.ico</Image>
<Url type="application/x-suggestions+json" method="GET"
template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchTerms}" />
<Url type="text/html" method="POST" template="http://MySite.com/query.php">
<Param name="sString" value="{searchTerms}"/>
</Url>
<Url type="application/x-suggestions+json" template="suggestionURL"/>
<moz:SearchForm>http://www.MySite.com</moz:SearchForm>
</OpenSearchDescription>
Run Code Online (Sandbox Code Playgroud)
这是我页面上osd文件的链接:
<link rel="search" type="application/opensearchdescription+xml" title="MySite" href="/opensearch.xml" />
Run Code Online (Sandbox Code Playgroud) 我正在寻找一种方法在我的网站上启用谷歌浏览器的"标签搜索"功能,有没有人有这方面的经验?
谷歌没有为我提供足够的信息,我猜这个社区更快.
非常感激
我们公司有一个内部网站,我正在尝试通过 OpenSearch 添加 Chrome Omnibox 支持。该网站是使用 ASP.NET MVC 5 构建的。我已将以下行添加到<head>
布局页面的标记中:
<link rel="search" type="application/opensearchdescription+xml" title="ABC" href="/abcopensearch.xml" />
这是我的 xml 文档,它位于根级别,名称为abcopensearch.xml
:
<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns:moz="http://www.mozilla.org/2006/browser/search/" xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>ABC</ShortName>
<Description>Find all your assets</Description>
<Url type="text/html" method="get" template="https://www.abcstaff.com/Abc?q={searchTerms}"/>
<InputEncoding>UTF-8</InputEncoding>
</OpenSearchDescription>
Run Code Online (Sandbox Code Playgroud)
我缺少什么?Chrome 是否删除了自动添加搜索引擎的功能?我已经重启 Chrome 好几次了。
如果我开始在Chrome中输入stackov ..我可以看到类似'按Tab键搜索stackoverflow.com'的内容.
SO基本上被认为是搜索引擎.
您是否知道如何在我们的WebApp中实现相同类型的功能?
我认为它应该与OpenSearch相关
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="http://sstatic.net/so/opensearch.xml">
Run Code Online (Sandbox Code Playgroud)
谢谢
编辑:
我认为应该只是指定以这种方式定义的xml(http://sstatic.net/so/opensearch.xml)
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Stack Overflow</ShortName>
<Description>Search stackoverflow.com for answers to your programming questions</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://stackoverflow.com/favicon.ico</Image>
<Url type="text/html" method="get" template="http://stackoverflow.com/search?q={searchTerms}"></Url>
</OpenSearchDescription>
Run Code Online (Sandbox Code Playgroud)
这是将使用的URL.
http://stackoverflow.com/search?q={searchTerms}
Run Code Online (Sandbox Code Playgroud)
searchTerms将填充您在chrome中输入的字符串
我正在尝试获得一个开放的搜索定义来处理子域。
我<head>
在 html 中添加了正确的行。
例子:
<link rel="search" type="application/opensearchdescription+xml" title="Example" href="http://www.example.org/opensearch.xml" />
Run Code Online (Sandbox Code Playgroud)
在 opensearch.xml 中:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Example</ShortName>
<LongName>Example Search</LongName>
<Description>Example Description</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://www.example.org/favicon.ico</Image>
<Url type="text/html" method="get" template="http://www.example.org/search/{searchTerms}" />
</OpenSearchDescription>
Run Code Online (Sandbox Code Playgroud)
当我访问http://www.example.org时,搜索已正确添加到 Google Chrome 的多功能框设置中。触发器关键字变为“example.org”。
但是,当我访问http://subdomain.example.org 时,它在 中具有相同的行<head>
,搜索添加了触发器关键字“subdomain.example.org”而不是“example.org”。
有没有解决的办法?
我在http://www.opensearch.org/Specifications/OpenSearch/1.1的文档中没有找到有关如何设置触发器关键字的任何信息。
我们计划利用 OpenSearch 进行 XDR 类型的项目。我们希望利用大多数主要功能,如警报、检测、用于异常检测的机器学习等。因此,我想知道,对于这个特定用例,使用 OpenSearch 而不是 Elasticsearch 是否有任何缺点。
\n我也没有在互联网上找到 Elasticsearch 与 OpenSearch 之间的任何适当比较。那么,有人可以提供我可以进行详细比较的链接或资源吗?
\n