2

We are running reindex on one of our database which is 400 GB approx. and we are seeing below debug log entries :-

2021-01-24 16:13:55.705 Debug: IndexerEnv::putRangeIndex: XDMP-RANGEINDEX: Range index error: double "": XDMP-LEXVAL: Invalid lexical value ""
2021-01-24 16:13:55.715 Debug: IndexerEnv::putRangeIndex: XDMP-RANGEINDEX: Range index error: double "": XDMP-LEXVAL: Invalid lexical value ""

It looks like one of the index is not having proper scalar type set or element in document is having invalid values? How can we troubleshoot this issue ? Any suggestions

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
SinghVK
  • 313
  • 2
  • 12

1 Answers1

1

What version of MarkLogic are you running? A quick test with MarkLogic 10.0-5 show a uri in the error message:

2021-01-25 09:36:01.636 Debug: IndexerEnv::putRangeIndex: XDMP-RANGEINDEX: Range index error: int fn:doc("/test/doc1.xml")/root/foo: XDMP-LEXVAL: Invalid lexical value "bar"

Without that, you will need to check which range indexes of type double you have in place, and try if XPath can show you which documents are troublesome. Something like:

subsequence(collection()[//path/to/double = ''], 1, 10) ! xdmp:node-uri(.)

Don't grab them all this way, but grabbing first 10 should be doable. Might give you an idea where to look.

HTH!

grtjn
  • 20,254
  • 1
  • 24
  • 35
  • It is odd that the message isn't including the doc and XPath to the element with the invalid value. Another way to try to reveal the documents is to change the *invalid values* option from *ignore* to *reject*, and then it will fail to reindex/save that document and should give you a clue as to which documents have those empty elements. – Mads Hansen Jan 25 '21 at 14:42
  • ML version = 9.0-11. We have 3 range index with scalar type "double". Total documents in database are 103,900,226. – SinghVK Jan 25 '21 at 17:04
  • You can do an unfiltered query for documents with a range index value above 0 and below 0 both. Documents with valid values will be excluded (assuming one value per document) but documents with invalid values will stay to be filtered. I think. – hunterhacker Jan 26 '21 at 08:17
  • @SinghVK Do you happen to know what fixed the issue? Im running into the same problem even though my element range indexes are set to "ignore" invalid options. Seems to be an issue specific to version 10 because these errors were not present before we upgraded. – nobleb Sep 21 '21 at 13:33