Marklogic 8 nodejs queryBuilder.orderBy SEARCH-BADORDERBY



我明白了

SEARCH-BADORDERBY:(err:FOER0000)索引需要支持元素、元素属性、json-property或字段排序规范

每次我尝试使用 orderBy。我以各种可能的方式尝试了。

qb.where(qb.value("hasGeolocation", true)).orderBy("username")

qb.where(qb.value("hasGeolocation", true)).orderBy(qb.property("username"))

qb.where(qb.value("hasGeolocation", true)).orderBy(qb.sort("username"))

qb.where(qb.value("hasGeolocation", true)).orderBy(qb.sort(qb.property("username")))

对于那种,我尝试了"上升"或"下降"方向。什么都没用。我做错了什么还是MarkLogic Node API有问题?

维克多,在我看来,您还没有在"用户名"上定义范围索引。在"用户名"上定义一个字符串范围索引,我想你会被设置的。

最新更新