标签: opensearch

OpenSearch OSDD文档在哪里?

有没有人知道我将这个XML文档命名为什么?现在我把它创建在哪里?

我想在我的网站上提供OSDD(OpenSearch描述文档),以便谷歌浏览器自动获取它的搜索功能.谷歌告诉我它是如何完成的,但不是应该托管的地方.我也找不到任何关于OpenSearch网站上最终位置的引用.我甚至尝试过寻找支持它的地方的来源,看看它是否是某种META标签无济于事.

编辑嗯,有一种方法可以明确地做到这一点.现在我只需要看看它是否有自动发生的方式,因为它在许多站点上都没有(它们都没有任何类型的链接标记):bugmenot.com,*.craigslist.org,以及任何其他网站可能会在他们右键单击他们的Chrome地址栏并选择"编辑搜索引擎..."时找到.

google-chrome opensearch

8
推荐指数
1
解决办法
2127
查看次数

OpenSearch描述文档发现和Chrome

我正在试图弄清楚如何使用OpenSearch宣传我的Web应用程序的搜索终端(参见http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document),但即便是我最简单的例子也行不通.我有index.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
    <head profile="http://a9.com/-/spec/opensearch/1.1/">
        <link title="Search" rel="search" type="application/opensearchdescription+xml" href="osdd.xml"/>
    </head>
    <body>
        hello
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

osdd.xml包含:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
    <ShortName>test</ShortName>
    <Description>test</Description>
    <Url type="text/html" template="http://example.com?q={searchTerms}"/>
</OpenSearchDescription>
Run Code Online (Sandbox Code Playgroud)

但似乎没有任何效果.Chrome的"标签搜索"行为未显示,并且使用开发者工具Chrome似乎根本没有加载osdd.xml.

有线索吗?

google-chrome opensearch

7
推荐指数
1
解决办法
3302
查看次数

OpenSearch 1.2 - 以编程方式索引模式

我正在尝试以编程方式在 Opensearch 中创建index_pattern仪表板。

由于我在 Opensearch 文档中没有找到任何与之相关的内容,因此我尝试了elastic search saved_objectsapi:

POST /api/saved_objects/index-pattern/my_index_pattern
{
  "attributes":{
    "title": "my_index"
  }
}
Run Code Online (Sandbox Code Playgroud)

但是当我调用它时,出现以下错误:

{
  "error" : "no handler found for uri [/api/saved_objects/index-pattern/my_index_pattern?pretty=true] and method [POST]"
}
Run Code Online (Sandbox Code Playgroud)

我该如何解决?Opensearch 是否有不同的要求来创建index_pattern

opensearch

7
推荐指数
1
解决办法
2903
查看次数

Opensearch 禁用 ssl/https 但不禁用 SecurityPlugin

现在可以禁用 ssl/https 但不能禁用 SecurityPlugin 本身吗?

以前,在 docker-compose 中,我只需禁用“ plugins.security.ssl.http.enabled=false”即可做到这一点。现在我使用helm安装,但不起作用。OpenSearch 想要一个始终证书。

几个小时以来我一直在尝试不同的选择。“ DISABLE_SECURITY_PLUGIN=true” - 完全禁用安全性对我来说不是一个选择。

我总是收到以下错误。

Likely root cause: OpenSearchException[plugins.security.ssl.transport.keystore_filepath or plugins.security.ssl.transport.server.pemcert_filepath and plugins.security.ssl.transport.client.pemcert_filepath must be set if transport ssl is requested.]
Run Code Online (Sandbox Code Playgroud)

我的

  opensearch.yml: |
    cluster.name: opensearch-cluster
    network.host: 0.0.0.0
    plugins:
      security:
        ssl:
          transport:
            enabled: false
            enforce_hostname_verification: false
          http:
            enabled: false
        allow_unsafe_democertificates: false
        allow_default_init_securityindex: true
        audit.type: internal_opensearch
        enable_snapshot_restore_privilege: true
        check_snapshot_restore_write_privileges: true
        restapi:
          roles_enabled: ["all_access", "security_rest_api_access"]
        system_indices:
          enabled: true
          indices:
            [
              ".opendistro-alerting-config",
              ".opendistro-alerting-alert*",
              ".opendistro-anomaly-results*",
              ".opendistro-anomaly-detector*",
              ".opendistro-anomaly-checkpoints",
              ".opendistro-anomaly-detection-state",
              ".opendistro-reports-*",
              ".opendistro-notifications-*",
              ".opendistro-notebooks",
              ".opendistro-asynchronous-search-response*", …
Run Code Online (Sandbox Code Playgroud)

opensearch

7
推荐指数
1
解决办法
7269
查看次数

谷歌浏览器:搜索API?

我正在寻找一种在我的网站上公开Goog​​le搜索功能的方法,以便Chrome用户可以使用上下文相关搜索(例如:)

Chrome搜索http://img19.imageshack.us/img19/7762/chromesearch.png

我知道YouTube归谷歌所有,但我不记得以前我看过这个功能的第三方网站.无论如何,我在google-labs或code.google.com上找不到任何引用,所以我转向你了.

如果有人对如何公开这个或参考文档有任何见解,我将非常感激.

search google-chrome opensearch web

6
推荐指数
1
解决办法
1080
查看次数

启用按Tab键在我的网站上搜索谷歌浏览器

可能重复:
如何为您的网站添加Google Chrome多功能框搜索支持?

我有一个关于如何为我自己的网站启用谷歌浏览器中的"按选项卡搜索"功能的问题.

我已经链接了一个opensearch.xml文档,我有以下内容:

<Url type="text/html" template="http://localhost:3000/?search={searchTerms}"/>

然而,这仍然无法奏效.难道我做错了什么?

谢谢!

search google-chrome opensearch

6
推荐指数
1
解决办法
5360
查看次数

AWS OpenSearch 为用户提供只读访问仪表板

我正在使用 aws OpenSearch 查看实时数据分析。

我正在使用以下角色为我的用户提供对仪表板的只读访问权限,如此处所述

  • kibana_用户
  • kibana_只读
  • 只读索引

但由于“kibana_user”角色的某些权限,用户仍然可以编辑仪表板。因此,我尝试使用 OpenSearch 内置功能创建重复角色,并从重复角色中删除管理和删除权限,并将该角色分配给我的用户。但是这次,即使我不删除管理和删除权限,用户也无法查看仪表板和仪表板列表,我在浏览器中收到以下错误

[indices:data/read/search] 和用户 [name=test-user-1, backend_roles=[], requestTenant=] 没有权限:security_exception

我尝试授予“indices:data/read/search”此角色权限以及更多权限,但它不起作用。任何解决方案

amazon-web-services opensearch kibana opensearch-dashboards

6
推荐指数
1
解决办法
5486
查看次数

如何使用 python 客户端库将 JSON 记录批量上传到 AWS OpenSearch 索引?

我有一个足够大的数据集,我想对 AWS OpenSearch 中的 JSON 对象进行批量索引。

我看不到如何使用以下任何一个来实现此目的:boto3、awswrangler、opensearch-py、elasticsearch、elasticsearch-py。

有没有办法在不直接使用 python 请求(PUT/POST)的情况下做到这一点?

请注意,这不适用于:ElasticSearch、AWS ElasticSearch。

非常感谢!

python opensearch elasticsearch-py aws-data-wrangler amazon-opensearch

6
推荐指数
1
解决办法
1万
查看次数

如何通过 python api 在 opensearch 中更新插入文档

我尝试将文档更新插入到 Opensearch,这意味着如果不存在 id,它将插入文档,如果 id 已经存在,它将更新文档(不会覆盖)。

例如,如果文档已经在 Opensearch 中{"id":1,"name":"Jack"},当我更新插入时{"id":1,"job":"engineer"}, opensearch 中的文档将变成{"id":1,"name":"Jack","job":"engineer"},而不仅仅是被覆盖。

我尝试使用 doc_as_upsert 进行 python index api,如下所示,但失败了:

pyClient.index(
            index = indexName,
            body = document,
            id = document['id'],
            refresh = True,
            doc_as_upsert = True
        )
Run Code Online (Sandbox Code Playgroud)

文档对象是:{"id":"123","name":"Jack","job":"Engineer"}

python opensearch

6
推荐指数
1
解决办法
3708
查看次数

在 ElasticSearch 中更改别名会返回 200 并已确认,但不会更改别名

使用带有 Java 17 的 elasticsearch 8.4.3 和一个由 3 个节点组成的集群,其中 3 个节点符合主节点条件,我们从以下情况开始:

  • 索引products-2023-01-12-0900其别名为current-products

然后我们开始一项创建新索引products-2023-01-12-1520 的工作,最后在客户端使用elastic-rest-client和别名 API,我们进行以下调用:

于 2023 年 1 月 12 日 16:27:26,893:

POST /_aliases
{"actions":[
   {
    "remove": { 
       "alias":"current-products",
       "index":"products-*"
    }
   },
   { 
    "add":{
       "alias":"current-products",
       "index":"products-2023-01-12-1520"}
    }
]}
Run Code Online (Sandbox Code Playgroud)

26 毫秒后,我们得到以下响应,HTTP 响应代码为 200:

{"acknowledged":true}
Run Code Online (Sandbox Code Playgroud)

但看看我们最终得到的结果,我们仍然有带有当前产品别名的旧索引。

我不明白为什么会发生这种情况,而且它不会 100% 发生(大约 10 次索引中发生了 2 次)。这是一个已知的错误吗?还是一种常规行为?

编辑@warkolm:

截至目前,在索引之前获取 /_cat/aliases?v :

alias               index                       filter routing.index routing.search is_write_index
current-products    products-2023-01-13-1510    -      -             -              -
Run Code Online (Sandbox Code Playgroud)

java rest http opensearch elasticsearch

6
推荐指数
1
解决办法
764
查看次数