After investigating the log files, the DataImporter was throwing an error from 
the Oracle DB driver:

java.sql.SQLException: ORA-22835: Buffer too small for CLOB to CHAR or BLOB to 
RAW conversion (actual: 2890, maximum: 2000)

Aka. There was a problem with the 551st item where a related item had a text 
field of type Clob that was too long and was therefore causing a problem when 
using the function TO_NCHAR to fix the type. 

FIX:
Used the Oracle function dbms_lob.substr("FIELD_NAME", MAX_LENGTH, 1) to just 
trim the string (this also applies and implicit converstion).

-----Original Message-----
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: 22 September 2009 19:27
To: solr-user@lucene.apache.org
Subject: Re: Oracle incomplete DataImport results

On Tue, Sep 22, 2009 at 10:53 PM, Daniel Bradley <
daniel.brad...@adfero.co.uk> wrote:

> I appear to be getting only a small number of items imported into Solr
> when doing a full-import against an oracle data-provider. The query I'm
> running is something approximately similar to:
>
> SELECT "ID", dbms_lob.substr("Text", 4000, 1) "Text", "Date",
> "LastModified", "Type", "Created", "Available", "Parent", "Title" from
> "TheTableName" where "Available" < CURRENT_DATE and "Available" >
> add_months(current_date, -1)
>
> This retrieves the last month's items from the database (The
> dbms_lob.substr function is used to avoid Solr simply indexing the
> object name as Text is the Oracle clob type). When running this in
> oracle sql developer approximately 5600 rows are returned however
> running a full import only imports approximately 550 items.
>
> There's no visible memory use and no exceptions suggesting any problems
> with lack of memory. Is there any limiting of the number of items you
> can import in a single request? Any other thoughts on this problem would
> be much appreciated.
>
>
What is the uniqueKey in schema.xml? Is it possible that many of those 5600
rows share the same value for solr's uniqueKey field?

There are no limits on the number of items you can import. The number of
documents created should correspond to the number of rows returned by the
root level entity's query (assuming the uniqueKey for each of those
documents is actually unique).

-- 
Regards,
Shalin Shekhar Mangar.


This message has been scanned for viruses by Websense Hosted Email Security - 
On Behalf of Adfero Ltd

DISCLAIMER: This email (including any attachments) is subject to copyright, and 
the information in it is confidential. Use of this email or of any information 
in it other than by the addressee is unauthorised and unlawful. Whilst 
reasonable efforts are made to ensure that any attachments are virus-free, it 
is the recipient's sole responsibility to scan all attachments for viruses.  
All calls and emails to and from this company may be monitored and recorded for 
legitimate purposes relating to this company's business.

Any opinions expressed in this email (or in any attachments) are those of the 
author and do not necessarily represent the opinions of Adfero Ltd or of any 
other group company.

Reply via email to