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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.5.1
    • library
    • 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

        For Gerrit Dashboard: NCBC-1523
        # Subject Branch Project Status CR V

        Activity

          jmorris Jeff Morris added a comment -

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

          jmorris Jeff Morris added a comment - Matthew Groves - can you post the index you are using?
          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

          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

          Jeff Morris the index is in the attached zip file

          matthew.groves Matthew Groves added a comment - Jeff Morris the index is in the attached zip file
          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" }

          }

          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

            jmorris Jeff Morris
            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