Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-765

boolean_query jsonSerialize uses wrong property name for must_not

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • None
    • None
    • None
    • 1

    Description

      boolean_query jsonSerialize uses wrong property name for must_not.

      The propery named updated by mustNot() is "mustNot", while the property name used to serialize is "must_not".

      This results in 

      Fatal error: Uncaught Couchbase\BaseException: LCB_ERR_PARSING_FAILURE (208)

      The following will demonstrate the problem - the serialized bool_query is an empty array.

       

          $interval_query = (new \Couchbase\DateRangeSearchQuery())

             ->start(0)

             ->end(0)

             ->field('deleted_at');

          $disjunction_query = new \Couchbase\DisjunctionSearchQuery([$interval_query]);

          $bool_query = new \Couchbase\BooleanSearchQuery();

          $bool_query->mustNot($disjunction_query);

          //var_dump($disjunction_query->jsonSerialize());

          var_dump($bool_query->jsonSerialize());

       

       

      Attachments

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

        Activity

          People

            avsej Sergey Avseyev
            michael.reiche Michael Reiche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty