-
Notifications
You must be signed in to change notification settings - Fork 66
Index visible in admin page but not working (following an error in ml-config config) #606
Comments
There's certainly a bug here, in that the XML structure wasn't validated. To fix your immediate problem, try removing that section from your ml-config.xml, bootstrapping, then putting in the two range indexes properly and bootstrapping again. |
Side note: if we implement #598 that should take care of this kind of problem. |
I'm not convinced you're getting the error for the reason you're thinking. When you create indexes they're not immediately available. My guess would be that you're querying the index before it's ready. You can check the database status in the admin console to see whether the database is indexing or not to get an idea of when it will be ready. Even though your XML is "bad" it's still valid XML and as far as I can tell Roxy will ignore the second range-field-index node. |
Robert : no, I had only 2 documents in the database and the reindexing was finished. |
Great, thanks! Perhaps we need to open a bug in ML as well. |
I already open it yesterday (#39494) but it was rejected because it's not possible using the "standard way". So I suppose this is the way roxy overwrites directly the config which cause this issue (??) |
I left some intel on your bug including an easily reproducible example of how Roxy would run the query. Hopefully that will make some headway. |
Thanks ! |
Engineering's recommendation is that we should use admin:database-range-field-index() to construct the XML rather then trusting our users to handcraft it and pass it in directly admin:database-add-range-field-index() . How do you feel about that @dmcassel ? |
There needs to be some way for users to specify an index. The problem is then validating that it was done correctly, and that isn't happening at the moment. I think the long-term solution to this is #598. |
I think #598 is more like a future plan for Roxy, but the real fix is like @RobertSzkutak suggests: using admin index functions instead of passing through XML literally. We fixed that on a number of places, but not everywhere yet. See also #492.. |
PR welcome! |
A bad copy/paste in the XML ml-config file (see example below : inside a ) before applying it has been applied without any error during bootstrap.
Example :
the "Test" field is created with its index (it's visible in the admin 8001) but impossible to query (XDMP-FIELDRIDXNOTFOUND: cts.fieldReference("Test") -- No field range index for Test http://marklogic.com/collation/ )
Note: the same config file is rejected with ML configuration manager.
The text was updated successfully, but these errors were encountered: