SOLRドキュメントコレクションのメタデータを更新するためにアトミックアップデートを使用しています。これを行うには、外部の.jsonファイルを使用して、コレクション内のすべてのドキュメントIDと可能なメタデータを記録し、「set」コマンドを使用して要求された更新をコミットします。しかし、外部ファイルが約8200バイト/ 220行を超えると、次のエラーメッセージが表示されることがわかりました。SOLRインデックスの更新中に不思議なEOFエラーメッセージ
"提供されたJSONを解析できません:予期しないEOF:char = (EOF)、位置= 8191 BEFORE = '' "
これは、私が別のデータベースでそれを再現したときのファイルの実際の内容(または括弧などがない可能性がある)と関連しているようです。さらに、外部ファイルを8000バイト未満のより小さいサイズにカットすると、アップデートが完全に機能します。誰がこれがどこから来るのかという考えを持っていますか?コレクションを更新する
curlコマンドは以下の通りです:
test5.json
カール 'http://localhost:8983/solr/these/update/json?commit=true' -d @ SOLRメインの設定ファイルは、ポスト後に利用可能です。必要に応じてjsonのアップデートファイルを提供することができます。私はそれ以上の要素があります。あなたの助けを事前に
おかげで、
バルテルミー島
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This is a DEMO configuration highlighting elements
specifically needed to get this example running
such as libraries and request handler specifics.
It uses defaults or does not define most of production-level settings
such as various caches or auto-commit policies.
See Solr Reference Guide and other examples for
more details on a well configured solrconfig.xml
https://cwiki.apache.org/confluence/display/solr/The+Well-Configured+Solr+Instance
-->
<config>
<!-- Controls what version of Lucene various components of Solr
adhere to. Generally, you want to use the latest version to
get all bug fixes and improvements. It is highly recommended
that you fully re-index after changing this setting as it can
affect both how text is indexed and queried.
-->
<luceneMatchVersion>6.6.0</luceneMatchVersion>
<!-- Load Data Import Handler and Apache Tika (extraction) libraries -->
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar"/>
<lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar"/>
<lib dir="${solr.install.dir:../../../..}/contrib/langid/lib" regex=".*\.jar"/>
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-.*\.jar"/>
<requestHandler name="/select" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="df">text</str>
</lst>
</requestHandler>
<requestHandler name="/dataimport" class="solr.DataImportHandler">
<lst name="defaults">
<str name="config">tika-data-config.xml</str>
</lst>
</requestHandler>
<updateRequestProcessorChain name="langid" default="true" onError = "skip">
<processor class="org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory"
onError = "continue">
<str name="langid.fl">text</str>
<str name="langid.langField">language_s</str>
<str name="langid.threshold">0.8</str>
<str name="langid.fallback">en</str>
</processor>
<processor class="solr.LogUpdateProcessorFactory" onError = "skip"/>
<processor class="solr.RunUpdateProcessorFactory" onError = "skip"/>
</updateRequestProcessorChain>
<!-- The default high-performance update handler -->
<updateHandler class="solr.DirectUpdateHandler2">
<!-- Enables a transaction log, used for real-time get, durability, and
and solr cloud replica recovery. The log can grow as big as
uncommitted changes to the index, so use of a hard autoCommit
is recommended (see below).
"dir" - the target directory for transaction logs, defaults to the
solr data directory. -->
<updateLog>
<str name="dir">${solr.ulog.dir:}</str>
</updateLog>
</updateHandler>
</config>
私は問題に近いと思います。セキュリティ上の理由から、アップロードの制限に関するカールに関する記事を見つけました。 https://stackoverflow.com/questions/31941213/is-there-any-size-limit-to-post-a-file-using-curl彼らは同じように構成するための他のパラメータかもしれませんか? – Barth
この問題に関する別の参考資料https://maxchadwick.xyz/blog/http-request-header-size-limits – Barth
リクエストがSolr(jetty経由)に届く前にいくつかの制限を打つ場合は、修正する必要があります最初。少し難解かもしれませんが、solr側ではparamの名前が変更されているなどの点があります。 – Persimmonium