lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject ERROR:unknown field, but what document was it?
Date Thu, 01 May 2008 17:05:44 GMT

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?


View raw message