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 so...@hullegard.com on 2008/05/01 19:05:44 UTC
ERROR:unknown field, but what document was it?
Hi,
The way I understand it, having multiple documents in a single xml
file and posting that to solr is faster then posting a single xml for
each document (even with a single commit after all separate xml
files). It makes sence, and some simple tests indicates that this is
true. However, if one of the documents triggers an error then solr
tells me about the error, but it doesn't say what document it was.
For example, I generated an xml file with 500 documents to be indexed,
and for document number 251 I deliberately added a field that doesn't
exist in the schema.xml. When I tried to make solr index this xml I
got the error:
ERROR:unknown field 'myNonExistantField'
And that is just great. But what document was it? I need to know this,
because the next step is to log an error like "document with id 251"
could not be indexed, error: unknown field 'myNonExistantField'". Then
I want to continue indexing document nr 252-500, and if a get another
error I repeat these steps. If the number of errors exceed a certain
level (for example 10 documents with errors) I abort the indexing and
log an error.
Is there a way to get this information out of solr?
Regards
/Jimi
Re: ERROR:unknown field, but what document was it?
Posted by Yonik Seeley <yo...@apache.org>.
On Thu, May 8, 2008 at 4:59 PM, <so...@hullegard.com> wrote:
> My tests showed that it was a big difference. It took about 1.2 seconds to
> index 500 separate adds in separate xml files (with a single commit
> afterwards), compared to about 200 milliseconds when sending a single xml
> with 500 adds.
Did you overlap the adds (use multiple threads)?
-Yonik
Re: ERROR:unknown field, but what document was it?
Posted by Alexander Ramos Jardim <al...@gmail.com>.
Well,
Keep-Alive is a standard at HTTP/1.1, it is not a Java standard.
2008/5/8 Chris Hostetter <ho...@fucit.org>:
>
> : My tests showed that it was a big difference. It took about 1.2 seconds
> to
> : index 500 separate adds in separate xml files (with a single commit
> : afterwards), compared to about 200 milliseconds when sending a single
> xml with
> : 500 adds. And according to the documentation java automatically uses
> : keep-alive (I found no way to force it myself).
>
> I'm not sure what you mean by "java automatically uses keep-alive" ... you
> mean you wrote your client code using java? but how do you initiate your
> connections to Solr?
>
> Nothing I know of in the way Solr handles updates should make adding
> multiple docs in one request faster then adding one doc per request -- any
> added overhead should be in the servlet container (and keep-alive should
> minimize that) ... if you have a simple reproducable test that
> demonstrates otherwise, i would consider that a "performance" bug.
>
> : > i thought we added something like this ... but i guess not.
> : >
> : > feel free to file a feature request in Jira.
> :
> : ah, but I guess it is only awailable in a nightly build? Do you know a
> jira
> : issue number I can look at? I didn't find anything related to this.
>
> no, i mean: i thought we added it, but when i tried on the trunk i see the
> same thing you see ... please file a feature request.
>
>
>
> -Hoss
>
>
--
Alexander Ramos Jardim
Re: ERROR:unknown field, but what document was it?
Posted by Chris Hostetter <ho...@fucit.org>.
: My tests showed that it was a big difference. It took about 1.2 seconds to
: index 500 separate adds in separate xml files (with a single commit
: afterwards), compared to about 200 milliseconds when sending a single xml with
: 500 adds. And according to the documentation java automatically uses
: keep-alive (I found no way to force it myself).
I'm not sure what you mean by "java automatically uses keep-alive" ... you
mean you wrote your client code using java? but how do you initiate your
connections to Solr?
Nothing I know of in the way Solr handles updates should make adding
multiple docs in one request faster then adding one doc per request -- any
added overhead should be in the servlet container (and keep-alive should
minimize that) ... if you have a simple reproducable test that
demonstrates otherwise, i would consider that a "performance" bug.
: > i thought we added something like this ... but i guess not.
: >
: > feel free to file a feature request in Jira.
:
: ah, but I guess it is only awailable in a nightly build? Do you know a jira
: issue number I can look at? I didn't find anything related to this.
no, i mean: i thought we added it, but when i tried on the trunk i see the
same thing you see ... please file a feature request.
-Hoss
Re: ERROR:unknown field, but what document was it?
Posted by so...@hullegard.com.
Quoting Chris Hostetter <ho...@fucit.org>:
>
> : The way I understand it, having multiple documents in a single xml file and
> : posting that to solr is faster then posting a single xml for each document
> : (even with a single commit after all separate xml files). It makes
> sence, and
> : some simple tests indicates that this is true. However, if one of the
>
> For the record: people say this every now and then, but I don't think
> anyone has ever posted any specific numbers comparing multiple docs in a
> single add, vs multiple seperate requests using "Keep-Alive" ... there
> shouldn't be any fundemental difference.
My tests showed that it was a big difference. It took about 1.2
seconds to index 500 separate adds in separate xml files (with a
single commit afterwards), compared to about 200 milliseconds when
sending a single xml with 500 adds. And according to the documentation
java automatically uses keep-alive (I found no way to force it myself).
> : schema.xml. When I tried to make solr index this xml I got the error:
> : ERROR:unknown field 'myNonExistantField'
> : And that is just great. But what document was it? I need to know
> this, because
> : the next step is to log an error like "document with id 251" could not be
> : indexed, error: unknown field 'myNonExistantField'". Then I want
> to continue
>
> i thought we added something like this ... but i guess not.
>
> feel free to file a feature request in Jira.
ah, but I guess it is only awailable in a nightly build? Do you know a
jira issue number I can look at? I didn't find anything related to this.
Regards
/Jimi
Re: ERROR:unknown field, but what document was it?
Posted by Chris Hostetter <ho...@fucit.org>.
: The way I understand it, having multiple documents in a single xml file and
: posting that to solr is faster then posting a single xml for each document
: (even with a single commit after all separate xml files). It makes sence, and
: some simple tests indicates that this is true. However, if one of the
For the record: people say this every now and then, but I don't think
anyone has ever posted any specific numbers comparing multiple docs in a
single add, vs multiple seperate requests using "Keep-Alive" ... there
shouldn't be any fundemental difference.
: schema.xml. When I tried to make solr index this xml I got the error:
: ERROR:unknown field 'myNonExistantField'
: And that is just great. But what document was it? I need to know this, because
: the next step is to log an error like "document with id 251" could not be
: indexed, error: unknown field 'myNonExistantField'". Then I want to continue
i thought we added something like this ... but i guess not.
feel free to file a feature request in Jira.
-Hoss