I'm currently having an issue in lucene cloudant implementation with pagination.

{"error":"scala.Symbol cannot be cast to org.apache.lucene.util.BytesRef","reason":null}

The URL that I am trying to access :

/_design/contact/search/name?q=name%3Asa%2A+OR+default%3Asa%2A&limit=10&bookmark=g1AAAAEPeJzLYWBgYMlgTmGQTUlKzi9KdUhJMtMrzsnMS9dLzskvTUnMK9HLSy3JASpjSmRIsv__38WmJPCwJJXmpOTGJeFqtscl-4kByCZVI9hQDyaAaa4DMhjAZIMDUAKaMZ-VEMyiXUFxJADEEPQXOKTlQUASZpV2Q&stale=ok&sort="name<string>"

What I found :

  1. If I remove the bookmark ( means 1st page ) it works fine.
  2. Or, If I remove the sort, it works fine.

below is the index that I created for this view :

"indexes": {
    "name": {
        "index": "function (doc)
        {
            if (doc.Type == 'contact')
            {
                index("default", doc._id);
                index("name",doc.Name,{"store": "yes"});

                if(doc.Profile) {index("profile", doc.Profile, {"store": "no"});}

                if (doc.Aliases)
                {
                    if (Array.isArray(doc.Aliases))
                    {
                        doc.Aliases.forEach(function (alias){
                            index("alias", alias, {"store":"yes"})
                        })
                    }
                    else
                    {
                        index("alias", doc.Alias_Name, {"store":"yes"})
                    }
                }
            }
        }"
    }
}
有帮助吗?

解决方案

We have deployed a fix for this issue and you should no longer be experiencing this problem. Please confirm that that is the case. Thanks!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top