Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1523

Full Text Search exception: "Unexpected character encountered while parsing value"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.5.1
    • Component/s: library
    • Labels:
    • Environment:
      Windows / .NET Core

      Description

      Summary: I'm getting an error message when trying to use an FTS index. The index functions when I search it from Couchbase Console (and it also seems to work fine in Java/Node)

      Repro:

      1. Setup Enterprise Edition 5.0.0 build 3217
      2. Create 'default' bucket
      3. Create user "demo" with password "123456" with Cluster Admin permissions
      4. Add some documents (see attached)
      5. Create a 'medical-condition' index. (see attached)
      6. Execute a full text search with MatchQuery, fields in the SearchParams, and highlighting for a field (see source code attached)

      Expected:

      Search results, no exception

      Actual:

      JsonReaderException with message "Unexpected character encountered while parsing value: {. Path 'status.errors', line 1, position 57."

      Notes:

      This is for the FTS portion of the Connect demo, but I attached a minimal console app that reproduces the error for me.

      Here's the full stack trace of the exception:

      Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'status.errors', line 1, position 57.
      at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
      at Newtonsoft.Json.JsonTextReader.ReadAsString()
      at Couchbase.Search.SearchDataMapper.ReadStatus(JsonTextReader reader, SearchQueryResult response)
      at Couchbase.Search.SearchDataMapper.Map[T](Stream stream)
      at Couchbase.Search.SearchClient.<QueryAsync>d__3.MoveNext()
      Unexpected character encountered while parsing value: {. Path 'status.errors', line 1, position 57.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          jmorris Jeff Morris added a comment -

          Matthew Groves - can you post the index you are using?

          Show
          jmorris Jeff Morris added a comment - Matthew Groves - can you post the index you are using?
          Hide
          jaekwon.park Jae Park [X] (Inactive) added a comment - - edited

          I'm attaching fts response packet from server.

          By the way, to reproduce , you need to remove 'uuid' field from the curl command in ftsbug.zip

          Show
          jaekwon.park Jae Park [X] (Inactive) added a comment - - edited I'm attaching fts response packet from server. By the way, to reproduce , you need to remove 'uuid' field from the curl command in ftsbug.zip
          Hide
          matthew.groves Matthew Groves added a comment -

          Jeff Morris the index is in the attached zip file

          Show
          matthew.groves Matthew Groves added a comment - Jeff Morris the index is in the attached zip file
          Hide
          jmorris Jeff Morris added a comment -

          NewtonSoft chokes on the single quotes surrounding Html in the errors:

          "status": {
          "total": 6,
          "failed": 6,
          "successful": 0,
          "errors":

          { "medical-condition_19263354892003de_13aa53f3": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_18572d87": "no highlighter with name or type *'Html'* registered", "medical-condition_19263354892003de_54820232": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_6ddbfb54": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_aa574717": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_f4e0a48a": "no highlighter with name or type 'Html' registered" }

          }

          Show
          jmorris Jeff Morris added a comment - NewtonSoft chokes on the single quotes surrounding Html in the errors: "status": { "total": 6, "failed": 6, "successful": 0, "errors": { "medical-condition_19263354892003de_13aa53f3": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_18572d87": "no highlighter with name or type *'Html'* registered", "medical-condition_19263354892003de_54820232": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_6ddbfb54": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_aa574717": "no highlighter with name or type 'Html' registered", "medical-condition_19263354892003de_f4e0a48a": "no highlighter with name or type 'Html' registered" } }

            People

            • Assignee:
              jmorris Jeff Morris
              Reporter:
              matthew.groves Matthew Groves
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.