To be clear: solr *should* fail with an error if you send an unknown
field.
I just tested this with a clean checkout of 1.3-dev and 1.2 and in both
cases I get an error 400 "unknown field 'asgasdgasgd'"
The suggestion to look at the "ignore option" is to make sure you don't
have one -- this should be the only to add an arbitrary unknown field
without an error.
From a clean 1.2/1.3-dev install, how can you reproduce the error?
I tried:
$ ant example
$ cd example/
$ java -jar start.jar
another terminal:
edit mem.xml to add: <field name="asgasdgasgd">5</field>
$ cd example/exampledocs
$ ./post.sh mem.xml
this gives:
<body><h2>HTTP ERROR: 400</h2><pre>ERROR:unknown field 'asgasdgasgd'</pre>
running either 1.2 or 1.3
ryan
Daniel Alheiros wrote:
Hi Hoss.
Well I'll enable this ignore options for fields that aren't declared in my
schema. Thanks.
Exactly, you can try it really easily, just remove one of your fields on the
example schema config and try to add content using the Java client API...
Well I'm using SOLRJ and it returns no error code for me. But anyway don't
you think the server should also have some logging informing that documents
are being discarded?
Cheers,
Daniel
On 28/11/07 19:25, "Chris Hostetter" <[EMAIL PROTECTED]> wrote:
: I didn't know that trick.
erik is refering to this in the example schema.xml...
<!-- uncomment the following to ignore any fields that don't already match
an existing
field name or dynamic field, rather than reporting them as an error.
alternately, change the type="ignored" to some other type e.g. "text"
if you want
unknown fields indexed and/or stored by default -->
<!--dynamicField name="*" type="ignored" /-->
...but it sounds like you are having some other problem ... you said that
when you POST your documents with "extra" fields you get a 200
response but the documents aren't getting indexed at all correct?
that is not suppose to happen, Solr should be generating an error. can
you give us more info on your setup: what does your schema.xml look like,
what does your update code look like (you said you were using SolrJ i
believe?) what does Solr log when these updates happen, etc...
-Hoss
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.