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> 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
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
