1

今天将我们的一个开发节点从 DSE 4.8.0 升级到 4.8.7,现在我在 system.log 中看到大量此类错误。关于为什么会发生这种情况以及如何解决的任何见解?

WARN [main_development.skus Index WorkPool scheduler thread-0] 2016-05-18 13:51:11,037 WorkPool.java:672 - Listener com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex$SSIIndexPoolListener@1d132e91 failed for pool main_development.skus Index with exception: SolrCore 'main_development.skus' is not available due to init failure: Unique key fields must not be tokenized. Problematic type: text_en_splitting_tight{class=org.apache.solr.schema.TextField,analyzer=org.apache.solr.analysis.TokenizerChain,args={autoGeneratePhraseQueries=true, positionIncrementGap=100, class=solr.TextField}} for field: sku org.apache.solr.common.SolrException: SolrCore 'main_development.skus' is not available due to init failure: Unique key fields must not be tokenized. Problematic type: text_en_splitting_tight{class=org.apache.solr.schema.TextField,analyzer=org.apache.solr.analysis.TokenizerChain,args={autoGeneratePhraseQueries=true, positionIncrementGap=100, class=solr.TextField}} for field: sku at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:742) ~[solr-uber-with-auth_2.0-4.10.3.1.1021.jar:na] at com.datastax.bdp.search.solr.core.CassandraCoreContainer.getCore(CassandraCoreContainer.java:170) ~[dse-search-4.8.7.jar:4.8.7] at com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex.getCore(AbstractSolrSecondaryIndex.java:550) ~[dse-search-4.8.7.jar:4.8.7] at com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex$SSIIndexPoolListener.onBackPressure(AbstractSolrSecondaryIndex.java:1461) ~[dse-search-4.8.7.jar:4.8.7] at com.datastax.bdp.concurrent.WorkPool.onBackPressure(WorkPool.java:668) [dse-core-4.8.7.jar:4.8.7] at com.datastax.bdp.concurrent.WorkPool.access$300(WorkPool.java:57) [dse-core-4.8.7.jar:4.8.7] at com.datastax.bdp.concurrent.WorkPool$BackPressureTask.run(WorkPool.java:694) [dse-core-4.8.7.jar:4.8.7] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_92] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_92] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_92] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_92] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_92] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_92] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92] Caused by: org.apache.solr.common.SolrException: Unique key fields must not be tokenized. Problematic type: text_en_splitting_tight{class=org.apache.solr.schema.TextField,analyzer=org.apache.solr.analysis.TokenizerChain,args={autoGeneratePhraseQueries=true, positionIncrementGap=100, class=solr.TextField}} for field: sku at com.datastax.bdp.search.solr.core.CassandraCoreContainer.load(CassandraCoreContainer.java:236) ~[dse-search-4.8.7.jar:4.8.7] at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.loadCore(SolrCoreResourceManager.java:257) ~[dse-search-4.8.7.jar:4.8.7] at com.datastax.bdp.search.solr.AbstractSolrSecondaryIndex$4.run(AbstractSolrSecondaryIndex.java:1011) ~[dse-search-4.8.7.jar:4.8.7] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_92] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_92] ... 3 common frames omitted Caused by: com.datastax.bdp.search.solr.CassandraIndexSchema$ValidationException: Unique key fields must not be tokenized. Problematic type: text_en_splitting_tight{class=org.apache.solr.schema.TextField,analyzer=org.apache.solr.analysis.TokenizerChain,args={autoGeneratePhraseQueries=true, positionIncrementGap=100, class=solr.TextField}} for field: sku at com.datastax.bdp.search.solr.CassandraIndexSchema.validateUniqueKey(CassandraIndexSchema.java:479) ~[dse-search-4.8.7.jar:4.8.7] at com.datastax.bdp.search.solr.CassandraIndexSchema.validate(CassandraIndexSchema.java:123) ~[dse-search-4.8.7.jar:4.8.7] at com.datastax.bdp.search.solr.core.CassandraCoreContainer.load(CassandraCoreContainer.java:232) ~[dse-search-4.8.7.jar:4.8.7] ... 7 common frames omitted

4

1 回答 1

2

这是设计使然,Solr 模式中的唯一键或主键不能是标记化字段,例如 TextField。请尝试使用 StrField。

于 2016-05-18T14:35:05.397 回答