问题标签 [solr8]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
321 浏览

solr - Solr 8.6.1 从 solr 7.2.1 迁移索引数据

我正在尝试将 Solr 索引数据从一台服务器迁移到另一台服务器。

以下我执行的步骤:

  • 创建集合备份并在另一台使用最新 Solr 版本 ie.8.6.1 的服务器上恢复它。
  • 创建复制备份以将数据迁移到另一台服务器。

在恢复复制时,我收到如下错误:

创建复制备份时使用的 API:

恢复复制备份时使用的 API:

注意:当我在另一台服务器上恢复集合时,核心名称不同。

0 投票
0 回答
137 浏览

solr - Solr's [child] Document Transformer returning empty child fields

I am trying to return child document fields with the parent in a query's field list.

In version 7.7 of Solr, we had to specify fl=*,[child parentFilter=type:account] which would correctly return all parents' fields along with the associated child documents of type account.

In version 8.x of Solr, things changed with the introduction of _nest_path_. We are properly including both the fieldType _nest_path_ and the field _nest_path_ in the schema (it's generated by SolrJ).

We are able to properly query on child document fields in relation to the parent, but unable to return child document fields.

In my example, I have two parent documents (account), each with 3 child documents (policy).

Here is the flat structure returned by *:*

Here is the response for q=type:account&fl=*,[child]

And if I don't return any parent fields, I get empty results (no child data)

I am using Spring's abstraction on SolrJ, but using SolrJ direct with the SolrInputDocument results in the same thing. Mentioning this in case there are any known bugs with either of these libraries.

Solr version = 8.5.2

SolrJ version = 8.5.2

0 投票
2 回答
53 浏览

intellij-idea - Intellij & Solr8:如何设置项目?

我需要有关我的 Solr8 项目的运行/调试配置的帮助。从终端我使用命令“bin/solr start”但是我无法调试我的变压器。为此,我需要在 Intellij 中添加运行配置。任何帮助表示赞赏。谢谢!!!

0 投票
1 回答
33 浏览

solr - Solr REST API - 强制 POST 替换托管资源

https://lucene.apache.org/solr/guide/8_2/managed-resources.html

在文档中有信息:

PUT/POST 用于将术语添加到现有列表中,而不是完全替换列表。这是因为向现有列表添加术语比替换列表更常见,因此 API 倾向于增量添加术语的更常见方法,尤其是因为还支持删除单个术语。

有没有办法强制 POST 请求替换端点上的所有托管资源,而不是添加条款?

Solr 版本 8.2

0 投票
1 回答
812 浏览

solr - Solr 升级到 8.8 后在部分更新时抛出错误

我正在做一个简单的部分更新场景,它适用于 Solr 版本 6.x 和 7.x。将 Solr 和 Solrj 都升级到 8.8 后,我收到以下异常:

solrj 代码与此处提供的示例类似,并且在升级之前可以正常工作。该操作是“添加”,带有一个简单的整数字段,用于提供 id 的文档。

请注意,这与stackoverflow上的上一个问题不同,因为我正在传递简单的整数字段,并且在 solr/lucene 端它被替换为org.apache.lucene.document.LazyDocument$LazyField.

0 投票
0 回答
26 浏览

solr - Solr Suggester 字典查询响应在使用多个字典重新加载核心时更改值

我在 Solr 8.7.0 建议器中使用多个字典。每个都用于不同的类型字段,因为我需要使用不同的标记器。它们都使用相同的分析器(AnalyzingInfixLookupFactory),当我构建它们时,它们工作得很好。但是当我重新加载核心时,当调用一个字典时,答案来自另一个。我不明白这种行为。

使用 </p> 查询两个字典时的预期响应

“.../suggest?suggest=true&suggest.dictionary=autoSuggest&suggest.dictionary=autoSuggestWS&wt=json&suggest.build=true”

将会:

重新加载核心后我得到了什么:

0 投票
1 回答
144 浏览

solr - 如何在solr中获取lucene索引的版本

我的用例:我目前正在使用 solr 5.5 并升级到 solr 8.8

为此,我需要在所有安装了 solr 的机器上重新建立索引。我需要检查索引版本,如果索引是从旧版本制作的,那么我将运行重新索引逻辑,如果它已经是新版本,我将跳过重新索引。

有没有办法检测索引版本?

注意:配置文件已经更新到新版本,所以不能使用来自 solrconfig.xml 的标签

0 投票
1 回答
23 浏览

solrj - 从 `SolrQuery` 转换为 `SolrRequest`

使用 solr8。目前,我正在使用如下简单的 solr 查询:

这很好用,但我有一个新要求,即在 solr 端点中包含一个特定于请求的标头。不幸的是,SolrQuery不支持任何明显的东西。但是,我看到SolrRequest确实有addHeader(). 耶!除了现在我必须转换SolrQuerySolrRequest对象。没什么大不了:

除了现在我给客户的电话需要改变。啊。

现在我需要NamedList<Object>QueryResponse某种方式转换为。啊。

而且,当然,queryResponse没有完全填充(例如elapsedTime没有设置)。我错过了什么吗?似乎必须有一种更简单的方法来做到这一点。

0 投票
1 回答
1118 浏览

solr - solr - 基本身份验证

(总初学者问题警报!)我正在尝试按照此文档在 SOLR 8.3(docker 容器:FROM solr:8.3)上设置基本身份验证:

我添加了 /var/solr/data/security.json:

当我尝试更改默认管理员密码时:

我得到错误:

0 投票
0 回答
150 浏览

solr - Solr 8.7 configset 在使用身份验证上传时为空

我们在 Solr 8.7 中启用了身份验证,现在我想上传一个配置集,从而基于这个配置集创建一个集合。我已按照以下步骤操作:

  1. 创建 config zip
    (cd /disk/configsets/my-collection/conf && zip -r - *) > my-collection.zip
    该 zip 文件正确地包含所有配置,其中顶层为 solrconfig.xml

  2. 上传配置集到动物园管理员
    curl -X POST --header "Content-Type:application/octet-stream" --user userSolr:pwdSolr --data-binary @my-collection.zip "http://host:port/solr/ admin/configs?action=UPLOAD&name=my-collection"

  3. 创建集合
    curl -X POST --header "Content-Type:application/octet-stream" --user userSolr:pwdSolr "http://host:port/solr/admin/collections?action=CREATE&name=my-collection&numShards=1&replicationFactor =1&createNodeSet=localhost:8081_solr&collection.configName=my-collection"

我可以看到 Solr UI 中列出的配置集以及创建的集合。但是,当我单击集合的文件部分时,它是空的。此集合没有配置,这意味着配置集上传为空

我错过了什么?