solrj - Solr Error This Indexschema is not mutable -
i want use schema.xml rather managed schema changed following in solrconfig.xml below
<schemafactory class="managedindexschemafactory"> <bool name="mutable">true</bool> <str name="managedschemaresourcename">managed-schema</str> </schemafactory>
to
<schemafactory class="classicindexschemafactory"/>
but indexschema not mutable error when try index flat file using post command.
remove addschemafieldsupdateprocessorfactory
section updaterequestprocessorchain
config in solrconfig.xml
the schemafactory option in solrconfig.xml. controls whether schema should defined "managed index schema": schema modification possible through schema api. default, if no schemafactory specified, default behavior use "classicindexschemafactory"
the classicindexschemafactory requires use of schema.xml file, can edited manually , loaded when collection loaded. setting disallows schema api methods modify schema.
when managedindexschemafactory specified instead, solr load schema resource named in managedschemaresourcename
, rather schema.xml.
addschemafieldsupdateprocessorfactory : processor dynamically add fields schema if input document contains 1 or more fields don't match field or dynamic field in schema.
read more on same here https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/update/processor/addschemafieldsupdateprocessorfactory.html
in short above process factory used managed schema. when 1 not want use managedindexschemafactory should removed updaterequestprocessorchain.
for more details of can check out solr code or read source code of addschemafieldsupdateprocessorfactory.java
debug method processadd(addupdatecommand cm)
, more on same.
Comments
Post a Comment