You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by kedardes <ke...@gmail.com> on 2009/09/15 21:43:29 UTC
Solr exception with missing required field (meta_guid_s)
Hi, I have a data-config file where I map the fields of a very simple table
using dynamic field definitions :
<document name="names">
<entity name="names" query="select * from test">
<field column="id" name="id_i" />
<field column="name" name="name_s" />
<field column="city" name="city_s" />
</entity>
</document>
but when I run the dataimport I get this error:
WARNING: Error creating document : SolrInputDocumnt[{id_i=id_i(1.0)={2},
name_s=name_s(1.0)={John Smith}, city_s=city_s(1.0)={Newark}}]
org.apache.solr.common.SolrException: Document [null] missing required
field: meta_guid_s
>From the schema.xml I see that the meta_guid_s field is defined as a "Global
unique ID" but does this have to be set explicitly or mapped to a particular
field?
thanks.
--
View this message in context: http://www.nabble.com/Solr-exception-with-missing-required-field-%28meta_guid_s%29-tp25460529p25460529.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr exception with missing required field (meta_guid_s)
Posted by Lance Norskog <go...@gmail.com>.
The "Global Unique ID" is a field that must be set, and must have a
different value in every document.
The schema design is unusual - meta_guid_s is a wildcard name. Since
the field must always be set, it will be more clear if the schema
gives this a name that is not a wildcard. For example, "meta_guid".
On Tue, Sep 15, 2009 at 11:35 PM, Shalin Shekhar Mangar
<sh...@gmail.com> wrote:
> On Wed, Sep 16, 2009 at 1:13 AM, kedardes <ke...@gmail.com> wrote:
>
>>
>> Hi, I have a data-config file where I map the fields of a very simple table
>> using dynamic field definitions :
>>
>> <document name="names">
>> <entity name="names" query="select * from test">
>> <field column="id" name="id_i" />
>> <field column="name" name="name_s" />
>> <field column="city" name="city_s" />
>> </entity>
>> </document>
>>
>> but when I run the dataimport I get this error:
>> WARNING: Error creating document : SolrInputDocumnt[{id_i=id_i(1.0)={2},
>> name_s=name_s(1.0)={John Smith}, city_s=city_s(1.0)={Newark}}]
>> org.apache.solr.common.SolrException: Document [null] missing required
>> field: meta_guid_s
>>
>> From the schema.xml I see that the meta_guid_s field is defined as a
>> "Global
>> unique ID" but does this have to be set explicitly or mapped to a
>> particular
>> field?
>>
>
> You have created that schema so you are the better person to answer that
> question. As far as a required field or uniqueKey is concerned, their values
> have to be set or copied from another field.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
--
Lance Norskog
goksron@gmail.com
Re: Solr exception with missing required field (meta_guid_s)
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Sep 16, 2009 at 1:13 AM, kedardes <ke...@gmail.com> wrote:
>
> Hi, I have a data-config file where I map the fields of a very simple table
> using dynamic field definitions :
>
> <document name="names">
> <entity name="names" query="select * from test">
> <field column="id" name="id_i" />
> <field column="name" name="name_s" />
> <field column="city" name="city_s" />
> </entity>
> </document>
>
> but when I run the dataimport I get this error:
> WARNING: Error creating document : SolrInputDocumnt[{id_i=id_i(1.0)={2},
> name_s=name_s(1.0)={John Smith}, city_s=city_s(1.0)={Newark}}]
> org.apache.solr.common.SolrException: Document [null] missing required
> field: meta_guid_s
>
> From the schema.xml I see that the meta_guid_s field is defined as a
> "Global
> unique ID" but does this have to be set explicitly or mapped to a
> particular
> field?
>
You have created that schema so you are the better person to answer that
question. As far as a required field or uniqueKey is concerned, their values
have to be set or copied from another field.
--
Regards,
Shalin Shekhar Mangar.