Fix your data.  That could mean removing the
empty element if it isn't needed (it's ok to be
missing, but if present must be of the correct
type).  Or put a default value into empty elements,
such as 0 or -1.  The former is probably a better
choice.

On Apr 25, 2012, at 6:11 PM, Danny Sinang wrote:

> You're right. The error below indicates an empty assetBaseId "" being cast as 
> long because the index is of type long.
> 
> What would you recommend I do next ? Change the range element index to type 
> string ? If so, won't that result in incorrect sort order for assetBaseId ?
> 
> If I stick it out with a long-type index, how do I handle XML docs with empty 
> assetBaseId's ?
> 
> Regards,
> Danny
> 
> XDMP-RANGEINDEX: xdmp:invoke("add-asset.xqy", (fn:QName("", 
> "requestingUser"), "1000036", fn:QName("", "assetToInsert"), ...)) -- Range 
> index error: long 
> fn:doc("/assets/2014582732323512788.xml")/asset/assetMeta/assetBaseId: 
> XDMP-CAST: (err:FORG0001) Invalid cast: xs:untypedAtomic("") cast as xs:long
> 
> Looks like the element range index error is cause
> 
> On Wed, Apr 25, 2012 at 12:09 PM, Ron Hitchens <[email protected]> wrote:
> 
>   Probably not.  That's usually a result of a range-indexed field
> in a new document not matching the type defined for the index.
> Without the index defined, you can ingest arbitrary content.  But
> with the index in place, content being added must match the index
> setting or the insert fails.
> 
>   Even though your reindexing isn't finished yet, and thus isn't
> being used yet, adding new content adds to the nascent index and
> will reject updates that aren't of the proper type.
> 
>   Check that the content being ingested matches the range index(es)
> you're defined.
> 
> On Apr 25, 2012, at 4:52 PM, Danny Sinang wrote:
> 
> > Could pausing reindexing cause range element index errors during ingestion ?
> >
> > Regards,
> > Danny
> >
> > On Tue, Apr 24, 2012 at 5:15 PM, Danny Sokolsky 
> > <[email protected]> wrote:
> > You can turn off reindexing for that database (for example, from the Admin 
> > Interface).  That will pause the reindexing, and when you turn it back on, 
> > it will pick up where it left off.  Some people, for example, turn it off 
> > during the day, then on at night, until reindexing is completed.
> >
> >
> >
> > -Danny
> >
> >
> >
> > From: [email protected] 
> > [mailto:[email protected]] On Behalf Of Danny Sinang
> > Sent: Tuesday, April 24, 2012 2:10 PM
> > To: general
> > Subject: [MarkLogic Dev General] Pause reindexing
> >
> >
> >
> > Hi,
> >
> >
> >
> > I created a new element range index. It's taking quite a while. Is there a 
> > way to pause or reschedule it ?
> >
> >
> >
> > Regards,
> > Danny
> >
> >
> >
> >
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://developer.marklogic.com/mailman/listinfo/general
> >
> >
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://developer.marklogic.com/mailman/listinfo/general
> 
> ---
> Ron Hitchens {mailto:[email protected]}   Ronsoft Technologies
>     +44 7879 358 212 (voice)          http://www.ronsoft.com
>     +1 707 924 3878 (fax)              Bit Twiddling At Its Finest
> "No amount of belief establishes any fact." -Unknown
> 
> 
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

---
Ron Hitchens {mailto:[email protected]}   Ronsoft Technologies
     +44 7879 358 212 (voice)          http://www.ronsoft.com
     +1 707 924 3878 (fax)              Bit Twiddling At Its Finest
"No amount of belief establishes any fact." -Unknown




_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to