Question

I have the following solr schema

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="testthing" version="1.5">
    <fields>
        <field name="_version_"     type="long"     indexed="true"  stored="true"   required="true"/>
        <field name="doc_id"        type="string"   indexed="true"  stored="true"   required="true"     multiValued="false"/>
        <field name="title"         type="string"   indexed="true"  stored="true"   required="false"    multiValued="false"/>
        <field name="doc_type"      type="string"   indexed="false" stored="true"   required="true"     multiValued="false"/>
        <field name="description"   type="string"   indexed="true"  stored="true"   required="false"    multiValued="false"/>
        <field name="allText"       type="fs_text"  indexed="true"  stored="false"  required="true"     multiValued="true"/>
    </fields>

    <uniqueKey>doc_id</uniqueKey>

    <copyField source="title" dest="allText" />
    <copyField source="description" dest="allText" />
    <dynamicField name="*" type="ignored" multiValued="true" />

    <types>
        <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
        <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
        <fieldType name="fs_text" class="solr.TextField" positionIncrementGap="100"/>
    </types>
</schema>

Solr complains about missing field text at dynamic field type

1898 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  ? SolrDispatchFilter.init() done
1918 [searcherExecutor-4-thread-1] ERROR org.apache.solr.core.SolrCore  ? org.apache.solr.common.SolrException: undefined field text at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1235)

however, my one and only dynamic field (ignore all not matched) doesn't use text type (it's type=ignore).

What am I missing here?

** so far, renaming the allText to text pretty much fixed the issue but I can't figure out why! Is there something special/predefined about text in Solr 4.1 ?

Was it helpful?

Solution

It is not about field type "text". It is about field named "text".

<defaultSearchField>text</defaultSearchField>

You may have changed or remove the default field in config. If this fixes the issue, then you know somewhere in the configuration you're referring to "text" field, possibly in solrconfig.xml as suggested in

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top