Thanks Mary,

I was able to ingest using the "ignore" option in range indexes. [😊]  I will 
try your other suggestions also.

Regards,
Devesh Tyagi
________________________________
From: general-boun...@developer.marklogic.com 
<general-boun...@developer.marklogic.com> on behalf of Mary Holstege 
<mary.holst...@marklogic.com>
Sent: Thursday, November 5, 2015 9:03 PM
To: general@developer.marklogic.com
Subject: Re: [MarkLogic Dev General] Skipping some documents from range 
indexing during ingestion


On 11/05/2015 06:50 AM, Tyagi, Devesh wrote:

Hi,


I have created range indexes on some elements in my database. Now I want to 
ingest some skeleton documents without any values in the concerned elements. 
Marklogic reports error, mentioning that the values have invalid lexical 
values. Is there a way to skip the checking of indexes on those skeleton 
documents.

You can set the range indexes to "ignore" bad values: this means that 
non-skeletal bad data will also be accepted as well, however. It means things 
will load without errors, but it doesn't necessarily mean that you will be able 
to use those range indexes without error. If an attempt is made to use one of 
those bad values somewhere where it is needed as a typed value, you'll get an 
error at query time, because it isn't of that type.

Or: you can remove the elements in your skeletal documents instead of having 
them be empty.

That is: <mystuff><title>Optional int value follows</title></mystuff> not 
<mystuff><title>Optional int value 
follows</title><intvalue></intvalue></mystuff>

Or:
You can use xsi:nil to indicate a null value:
<mystuff><title>Optional int follows</title><intvalue 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";<http://www.w3.org/2001/XMLSchema-instance>
 xsi:nil="true"></intvalue></mystuff>
XML Schema instance namespace - World Wide Web 
Consortium<http://www.w3.org/2001/XMLSchema-instance>
www.w3.org
$Date: 2001/03/16 20:25:57 $ $Id: XMLSchema-instance.xsd,v 1.4 2001/03/16 
20:25:57 ht Exp $ This schema should never be used as such: the XML ...




Strictly speaking, you should also have a schema for the namespace your 
document is in that has a declaration for intvalue that says it is nullable 
(you don't have to have a complete schema, just enough to have this 
declaration). However, MarkLogic will skip values marked with xsi:nil="true" 
even without the schema.

You can't skip indexing specific documents.

//Mary
"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to