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 ahmad ajiloo <ah...@gmail.com> on 2011/09/24 16:15:30 UTC

indexing a xml file

hello
Solr Tutorial page explains about index a xml file. but when I try to index
a xml file with this command:
~/Desktop/apache-solr-3.3.0/example/exampledocs$ java -jar post.jar solr.xml
I get this error:
SimplePostTool: FATAL: Solr returned an error #400 ERROR:unknown field
'name'

can anyone help me?
thanks

Re: indexing a xml file

Posted by GR <th...@gmail.com>.
i think the xml to be indexed has to follow a certain schema, defined  
in schema.xml under conf directory. maybe, your solr.xml is not doing  
that

Sent from my iPhone

On 24 Sep 2011, at 18:15, ahmad ajiloo <ah...@gmail.com> wrote:

> hello
> Solr Tutorial page explains about index a xml file. but when I try  
> to index
> a xml file with this command:
> ~/Desktop/apache-solr-3.3.0/example/exampledocs$ java -jar post.jar  
> solr.xml
> I get this error:
> SimplePostTool: FATAL: Solr returned an error #400 ERROR:unknown field
> 'name'
>
> can anyone help me?
> thanks

Re: indexing a xml file

Posted by Gora Mohanty <go...@mimirtech.com>.
On Tue, Sep 27, 2011 at 7:46 PM, ahmad ajiloo <ah...@gmail.com> wrote:
> find the attachments.
[...]

So, it is pretty clear then. As people have mentioned earlier,
your solr.xml has fields that are not defined in schema.xml.
E.g., you need to have a field with name="name" defined
for the particular field referred to in the error message.
Something like:
<field name="name" type="text" stored="false" indexed="true"/>
though, the attributes will vary depending on your needs.

Regards,
Gora

Re: indexing a xml file

Posted by vidhya <vi...@gmail.com>.
FATAL: Solr returned an error #400 ERROR:unknown field
>'name'


This issue is due to data type mismatch in both solr(schema.xml) and in
coding part(Adding documents).
Try to make both the fields should be similar.

--
View this message in context: http://lucene.472066.n3.nabble.com/indexing-a-xml-file-tp3364392p3990231.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: indexing a xml file

Posted by ahmad ajiloo <ah...@gmail.com>.
find the attachments.
thanks

On Sun, Sep 25, 2011 at 7:41 AM, Bill Bell <bi...@gmail.com> wrote:

> Send us the example "solr.xml" and "schema.xml'". You are missing fields
> in the schema.xml that you are referencing.
>
> On 9/24/11 8:15 AM, "ahmad ajiloo" <ah...@gmail.com> wrote:
>
> >hello
> >Solr Tutorial page explains about index a xml file. but when I try to
> >index
> >a xml file with this command:
> >~/Desktop/apache-solr-3.3.0/example/exampledocs$ java -jar post.jar
> >solr.xml
> >I get this error:
> >SimplePostTool: FATAL: Solr returned an error #400 ERROR:unknown field
> >'name'
> >
> >can anyone help me?
> >thanks
>
>
>

Re: indexing a xml file

Posted by Bill Bell <bi...@gmail.com>.
Send us the example "solr.xml" and "schema.xml'". You are missing fields
in the schema.xml that you are referencing.

On 9/24/11 8:15 AM, "ahmad ajiloo" <ah...@gmail.com> wrote:

>hello
>Solr Tutorial page explains about index a xml file. but when I try to
>index
>a xml file with this command:
>~/Desktop/apache-solr-3.3.0/example/exampledocs$ java -jar post.jar
>solr.xml
>I get this error:
>SimplePostTool: FATAL: Solr returned an error #400 ERROR:unknown field
>'name'
>
>can anyone help me?
>thanks