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

Dotnet raises a CouchbaseException instead of the expected InvalidArgumentException when the value of k < 1 in vector search query options

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.5.0
    • None
    • None
    • 1
    • SDK06: FIT, PS, CXX
    • High

    Description

      Dotnet raises a CouchbaseException instead of the expected InvalidArgumentException when the value of k < 1 in vector search query options.

      Repo:

      Pass K = 0 in VectorQuery options.

      Dotnet performer logs:

      Couchbase.CouchbaseException: rest_index: Query, indexName: global_vector_index_07f991, err: bleve: QueryBleve parsing searchRequest, err: k must be greater than 0 and vector must be non-empty
         at Couchbase.Search.SearchClient.QueryAsync(String indexName, FtsSearchRequest ftsSearchRequest, VectorSearch vectorSearch, CancellationToken cancellationToken) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/couchbase-net-client/src/Couchbase/Search/SearchClient.cs:line 224
         at Couchbase.Cluster.<>c__DisplayClass40_0.<<SearchAsync>g__Func|0>d.MoveNext() in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/couchbase-net-client/src/Couchbase/Cluster.cs:line 438
      --- End of stack trace from previous location ---
         at Couchbase.Core.Retry.RetryOrchestrator.RetryAsync[T](Func`1 send, IRequest request) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/couchbase-net-client/src/Couchbase/Core/Retry/RetryOrchestrator.cs:line 72
         at Couchbase.Cluster.SearchAsync(String indexName, SearchRequest searchRequest, SearchOptions options) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/couchbase-net-client/src/Couchbase/Cluster.cs:line 441
         at Couchbase.Transactions.FitPerformer.Workload.SearchHelper.ExecuteSearchV2Query(SearchWrapper searchWrapper, ConcurrentDictionary`2 spans, Result result, ICluster cluster) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/Workload/SearchHelper.cs:line 86
         at Couchbase.Transactions.FitPerformer.ClusterBucketScopeCollectionCommandExecutor.HandleClusterLevelCommand(Command op, ClusterConnection connection, Result result) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/Workload/ClusterBucketScopeCollectionCommandExecutor.cs:line 551
         at Couchbase.Transactions.FitPerformer.ClusterBucketScopeCollectionCommandExecutor.RunCommand(Command op, ClusterConnection connection, Result result, ConcurrentDictionary`2 spans, String runId, Action`1 consumer, StreamOwner streamOwner, Counters counters) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/Workload/ClusterBucketScopeCollectionCommandExecutor.cs:line 47
         at Couchbase.Transactions.FitPerformer.SdkCommandExecutor.ExecuteCommand(Command op, ClusterConnection connection) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/Workload/SdkCommandExecutor.cs:line 160
         at Couchbase.Transactions.FitPerformer.SdkCommandExecutor.RunCommand(Command command, Counters counters, ClusterConnection connection, Action`1 consumer, String runId, StreamOwner streamOwner, ConcurrentDictionary`2 spans) in /Users/saurabhmishra/Desktop/work/gerrit/FIT/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/Workload/SdkCommandExecutor.cs:line 42
      -----------------------Context Info---------------------------
      {"indexName":"global_vector_index_07f991","query":"{\u0022ctl\u0022:{\u0022timeout\u0022:75000,\u0022consistency\u0022:{\u0022level\u0022:\u0022at_plus\u0022,\u0022vectors\u0022:{\u0022global_vector_index_07f991\u0022:{\u0022821/23168876196219\u0022:33,\u002250/226017003788999\u0022:33,\u0022315/267380054723400\u0022:33,\u0022572/78250503134450\u0022:33,\u002288/62554461659614\u0022:33,\u0022863/29055310610232\u0022:33,\u0022598/150502467251585\u0022:33,\u0022337/102478860123875\u0022:33,\u0022494/266022832825146\u0022:33,\u0022745/211781359513443\u0022:33,\u0022558/219934030618470\u0022:33,\u0022297/225468413249437\u0022:33,\u002232/7925198452982\u0022:33,\u0022807/278191021681370\u0022:33,\u0022323/77996790761946\u0022:33,\u0022580/237936687166703\u0022:33,\u0022845/30245777471885\u0022:33,\u002274/238667731485255\u0022:33,\u0022245/184889607626184\u0022:33,\u00221010/92984543370070\u0022:33,\u0022259/220271562086592\u0022:33,\u0022516/96051982276872\u0022:33,\u0022781/240348711046417\u0022:33,\u002210/201758617847883\u0022:33,\u0022622/273019283029163\u0022:33,\u0022361/185405893422737\u0022:33,\u002296/152619036533046\u0022:33,\u0022871/236216964177184\u0022:33,\u0022984/142633649566801\u0022:33,\u0022223/74402376106230\u0022:33,\u002224/124145080497671\u0022:33,\u0022799/107889385747837\u0022:33,\u0022534/84697552115952\u0022:33,\u0022273/173897027452358\u0022:33,\u0022885/195311476554181\u0022:33,\u0022114/141043952392249\u0022:33,\u0022379/65908833390823\u0022:33,\u0022636/151444726847189\u0022:33,\u0022707/173335313260526\u0022:33,\u0022452/128889251864412\u0022:33,\u0022857/276673385622987\u0022:33,\u002294/99250268037036\u0022:33,\u0022343/265187877637722\u0022:33,\u0022592/259432294200069\u0022:33,\u002252/87197968279272\u0022:33,\u0022819/129027316185760\u0022:33,\u0022570/258375891782681\u0022:33,\u0022317/3089640660814\u0022:33,\u0022386/104295749108968\u0022:33,\u0022645/5813417209802\u0022:33,\u0022578/45949266129954\u0022:33,\u0022325/55690305802533\u0022:33,\u002276/198906092919728\u0022:33,\u0022843/118793019636455\u0022:33,\u0022303/24444758874954\u0022:33,\u0022552/72265376146139\u0022:33,\u0022801/217626117776869\u0022:33,\u002238/91217530506965\u0022:33,\u0022153/179273985801870\u0022:33,\u0022926/37455799971743\u0022:33,\u0022367/144108889877517\u0022:33,\u0022616/217319455364713\u0022:33,\u0022865/98220053409149\u0022:33,\u0022102/243175118922575\u0022:33,\u0022514/175676450732306\u0022:33,\u0022261/135097410663224\u0022:33,\u002212/239055382102926\u0022:33,\u0022779/46616453158462\u0022:33,\u0022948/241371309184348\u0022:33,\u0022179/114822673642562\u0022:33,\u0022116/279895712523908\u0022:33,\u0022883/151088813535835\u0022:33,\u0022634/125364930053403\u0022:33,\u0022381/40302283834415\u0022:33,\u0022793/272179253867802\u0022:33,\u002230/37383139428846\u0022:33,\u0022279/44962162955252\u0022:33,\u0022528/147069687617357\u0022:33,\u0022687/213490107723920\u0022:33,\u0022424/166590763375609\u0022:33,\u00221004/177330232254552\u0022:33,\u0022235/254897144057421\u0022:33,\u0022482/43523080238446\u0022:33,\u0022741/136902484941154\u0022:33,\u0022129/146343857981715\u0022:33,\u0022902/46470038285376\u0022:33,\u0022655/168069614889941\u0022:33,\u0022392/48315567662222\u0022:33,\u0022311/2726677741602\u0022:33,\u0022560/186077256540600\u0022:33,\u0022759/173355114759619\u0022:33,\u0022496/70562855562715\u0022:33,\u0022249/178658832793938\u0022:33,\u00221022/219556074637387\u0022:33,\u0022410/205065731875081\u0022:33,\u0022669/151120881330172\u0022:33,\u0022916/233075023141588\u0022:33,\u0022147/207994278220834\u0022:33,\u002244/177581993376937\u0022:33,\u0022811/18427838573541\u0022:33}}},\u0022query\u0022:{\u0022match_none\u0022:null}}","parameters":null,"httpStatus":"BadRequest","clientContextId":null,"statement":null,"message":"rest_index: Query, indexName: global_vector_index_07f991, err: bleve: QueryBleve parsing searchRequest, err: k must be greater than 0 and vector must be non-empty","errors":"rest_index: Query, indexName: global_vector_index_07f991, err: bleve: QueryBleve parsing searchRequest, err: k must be greater than 0 and vector must be non-empty","retryReasons":null}
      

      Attachments

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

        Activity

          People

            jmorris Jeff Morris
            saurabh.mishra Saurabh Mishra
            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