我收到了这个错误
collection1:org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:无法为core collection1加载conf:[schema.xml] fieldType"pint"的插件初始化失败:加载类'solr时出错. IntField".
当我试图导入集合1(solr 4.5)架构到solr 5.1.
我只从不同的机器上复制集合1,其中solr 4.5运行并粘贴在这里/ solr/server/solr/collection1其中solr 5.1运行并重新启动solr.对不起,我是初学者,不太了解solr,只需按照一些教程.
日志
org.apache.solr.common.SolrException: Could not load conf for core collection1: Plugin init failure for [schema.xml] fieldType "pint": Error loading class 'solr.IntField'. Schema file is /home/jackson/Downloads/solr/server/solr/collection1/conf/schema.xml
at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:78)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:516)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:283)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:277)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "pint": Error loading class 'solr.IntField'. Schema file is /home/jackson/Downloads/solr/server/solr/collection1/conf/schema.xml
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:596)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:175)
at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:102) …
Run Code Online (Sandbox Code Playgroud) 例如,我在index_synonyms.txt中有同义笔记本电脑,上网本,笔记本
当用户搜索上网本时,我想提升原始文本,然后通过同义词进行扩展?有没有办法在SynonymFilterFactory中指定它?例如,使用原始术语两次,因此他的TF将更大
我有一个LocationIndex
在solr中命名的索引,其字段如下:
<fields>
<field name="solr_id" type="string" stored="true" required="true" indexed="true"/>
<field name="solr_ver" type="string" stored="true" required="true" indexed="true" default="0000"/>
// and some more fields
</fields>
<uniqueKey>solr_id</uniqueKey>
Run Code Online (Sandbox Code Playgroud)
但现在我想改变架构,这样独特的密钥必须是复合台现有本领域solr_id
和solr_ver
......东西如下:
<fields>
<field name="solr_id" type="string" stored="true" required="true" indexed="true"/>
<field name="solr_ver" type="string" stored="true" required="true" indexed="true" default="0000"/>
<field name="composite-id" type="string" stored="true" required="true" indexed="true"/>
// and some more fields
</fields>
<uniqueKey>solr_ver-solr_id</uniqueKey>
Run Code Online (Sandbox Code Playgroud)
搜索后我发现可以通过在schema中添加以下内容:(ref:Solr Composite来自模式中现有字段的唯一键)
<updateRequestProcessorChain name="composite-id">
<processor class="solr.CloneFieldUpdateProcessorFactory">
<str name="source">docid_s</str>
<str name="source">userid_s</str>
<str name="dest">id</str>
</processor>
<processor class="solr.ConcatFieldUpdateProcessorFactory">
<str name="fieldName">id</str>
<str name="delimiter">--</str>
</processor>
<processor class="solr.LogUpdateProcessorFactory" …
Run Code Online (Sandbox Code Playgroud) 我正在使用具有以下配置的solr建议组件:
schema.xml中
<fieldType name="textSpell" class="solr.TextField">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<field name="image_memo" type="text_general"/>
<field name="username" type="text_general"/>
<field name="image_memo" type="text_general"/>
<field name="image_text" type="text_general"/>
<!-- More fields included here -->
<field name="spell" type="textSpell" indexed="true" stored="true" multiValued="true"/>
<copyField source="*" dest="spell"/>
Run Code Online (Sandbox Code Playgroud)
solrconfig.xml中
<searchComponent class="solr.SpellCheckComponent" name="suggest">
<lst name="spellchecker">
<str name="name">suggest</str>
<str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
<str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
<str name="field">spell</str>
<str name="buildOnCommit">true</str>
</lst>
</searchComponent>
<requestHandler class="org.apache.solr.handler.component.SearchHandler"
name="/suggest">
<lst name="defaults">
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">suggest</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.count">6</str>
<str name="spellcheck.collate">true</str>
<str name="spellcheck.collateExtendedResults">true</str>
<str name="spellcheck.collate">true</str>
<str name="spellcheck.maxCollations">6</str>
<str name="spellcheck.maxCollationTries">1000</str> …
Run Code Online (Sandbox Code Playgroud) 我在solr架构中有这些字段:
<fields>
<field name="Id" type="string" indexed="true" stored="true" multiValued="false" required="true" />
<field name="IdCategory" type="string" indexed="true" stored="true" multiValued="false" required="true" />
<field name="Rank" type="long" indexed="true" stored="true" multiValued="false" required="true" />
<field name="TypeRank" type="string" indexed="true" stored="true" multiValued="false" required="false" default="category" />
<field name="_version_" type="long" indexed="true" stored="true"/>
</fields>
Run Code Online (Sandbox Code Playgroud)
我可以使用2或3个字段作为uniqueKeys而不是One吗?当我尝试:
<uniqueKey>(Id,IdCategory,Rank,TypeRank)</uniqueKey>
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:Schema Parsing Failed:unknown field'(Id,IdCategory,Rank,TypeRank)'.架构文件是/var/solr/Rank/schema.xml
我想myfield
在solr中对字段应用不区分大小写的搜索.
我用Google搜索了一下,我发现,我需要应用LowerCaseFilterFactory
字段类型和字段应该是solr.TextFeild
.
我在我的应用程序中schema.xml
重新索引数据,然后我的搜索似乎也区分大小写.
以下是我执行的搜索.
http://localhost:8080/solr/select?q=myfield:"cloud university"&hl=on&hl.snippets=99&hl.fl=myfield
Run Code Online (Sandbox Code Playgroud)
以下是字段类型的定义
<fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<!-- Case insensitive stop word removal.
add enablePositionIncrements=true in both the index and query
analyzers to leave a 'gap' for more accurate phrase queries.
-->
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords_en.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" …
Run Code Online (Sandbox Code Playgroud) 如何获取指定为未存储在 solr 模式中的字段“to”值。该字段有一个 copyField“text”。 Facet导致内存越界, 有没有办法在不使用facet查询的情况下查看这些值?