加载数据后,在Solrcloud中修改字段(索引)
SOLR-SOLR-8.9.0,JAVA版本“ 11.0.12” 2021-07-20 LTS 我正在使用3个Apache Zookeeper实例(apache-zookeeper-3.6.1-bin.tar.gz)使用外部Zookeeper Ensemble Solr Cloud已在2个不同的机器上设置(在不同的机器上表示2个SOLR节点),并使用3个Zookeeper实例进行了设置。
使用以下命令成功将配置上传到ZookeEpre。
./server/scripts/cloud-scripts/zkcli.sh -zkhost <Node1 IP>:2181,<Node2 IP>:2181,<Node3 IP>:2181 -cmd upconfig -confname renametoyourname_configs -confdir solr8.9.0/server/solr/configsets/<renametoyourname_configs>/conf
最终,我创建了收藏夹
http://<Node1 IP>:8983/solr/admin/collections?action=CREATE&name=<myCollection>&numShards=10&replicationFactor=1&maxShardsPerNode=5&collection.configName= renametoyourname_configs
cons逐一加载了多个.csv文件
curl "http://localhost:8983/solr/$solrCollection/update?commit=true" --data-binary @/home/data/solrcloud/files/testDir/xaf.tmp -H 'Content-type:application/csv'
之后,我使用以下命令将所有.CSV FILESS的 。每个.CSV文件包含12列,其中将第一列,第二个列定义为true,同时将配置上传到Zookeeper。
为此,我已经修改了托管 - Schema(在/solr-8.9.0/server/solr/solr/configsets/_default/conf/managed-schema)上上传之前,请上传到Zookeeper。
<field name="FirstColumn" type="text_general" multiValued="false" indexed="true" stored="true"/>
<field name="SecondColumn" type="plong" multiValued="false" indexed="true" stored="true"/>
<field name="ThirdColumn" type="text_general" multiValued="false" indexed="false" stored="true"/>
<field name="FourthColumn" type="text_general" multiValued="false" indexed="false" stored="true"/>
...so on
现在,在Solr加载了10000万行之后,我也想在第三列上创建索引。 我该怎么做?
solr - solr-8.9.0, java version "11.0.12" 2021-07-20 LTS
I am using external zookeeper ensemble with 3 apache zookeeper instance (apache-zookeeper-3.6.1-bin.tar.gz)
Solr cloud have been setup on 2 different machines (means 2 solr nodes on different machines) with 3 zookeeper instances.
Successfully uploaded configs to zookeepre using following command.
./server/scripts/cloud-scripts/zkcli.sh -zkhost <Node1 IP>:2181,<Node2 IP>:2181,<Node3 IP>:2181 -cmd upconfig -confname renametoyourname_configs -confdir solr8.9.0/server/solr/configsets/<renametoyourname_configs>/conf
Finally i have created the collections
http://<Node1 IP>:8983/solr/admin/collections?action=CREATE&name=<myCollection>&numShards=10&replicationFactor=1&maxShardsPerNode=5&collection.configName= renametoyourname_configs
After that i have loaded multiple .csv files in solr one by one using following command
curl "http://localhost:8983/solr/$solrCollection/update?commit=true" --data-binary @/home/data/solrcloud/files/testDir/xaf.tmp -H 'Content-type:application/csv'
All .csv filess have 100 million rows. Each .csv file contains 12 columns, in which firstColumn,secondColumn have been defined with index as true while uploading configs to zookeeper.
To do this i have modified managed-schema(present at /solr-8.9.0/server/solr/configsets/_default/conf/managed-schema) before uploading 'renametoyourname_configs' to zookeeper.
<field name="FirstColumn" type="text_general" multiValued="false" indexed="true" stored="true"/>
<field name="SecondColumn" type="plong" multiValued="false" indexed="true" stored="true"/>
<field name="ThirdColumn" type="text_general" multiValued="false" indexed="false" stored="true"/>
<field name="FourthColumn" type="text_general" multiValued="false" indexed="false" stored="true"/>
...so on
Now after loading 100milion rows in solr, I want to create index on ThirdColumn also.
How can i do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将必须再次索引数据。没有捷径。
You will have to again index the data. There is no shortcut to this.