python-sonic-client icon indicating copy to clipboard operation
python-sonic-client copied to clipboard

SUGGEST returns a PENDING answer

Open David-Lor opened this issue 3 years ago • 2 comments

Describe the bug

I'm having the same problem as previously reported in #13: when running a SearchClient.suggest() query, returns a PENDING string.

To Reproduce

Running the example code blocks from Readme:

>>> with IngestClient("127.0.0.1", 1491, "password") as ingestcl:
...     print(ingestcl.ping())
...     print(ingestcl.protocol)
...     print(ingestcl.bufsize)
...     ingestcl.push("wiki", "articles", "article-1", "for the love of god hell")
...     ingestcl.push("wiki", "articles", "article-2", "for the love of satan heaven")
...     ingestcl.push("wiki", "articles", "article-3", "for the love of lorde hello")
...     ingestcl.push("wiki", "articles", "article-4", "for the god of loaf helmet")
... 
True
1
0
True
True
True
True

>>> with SearchClient("127.0.0.1", 1491, "password") as querycl:
...     print(querycl.ping())
...     print(querycl.query("wiki", "articles", "for"))
...     print(querycl.query("wiki", "articles", "love"))
...     print(querycl.suggest("wiki", "articles", "hell"))
... 
True
[]
['article-3', 'article-2', 'article-1']
PENDING XjOQ6NLi

Expected behavior

Receiving a result on the last method call (queryctl.suggest). Is it expected to work like that?

** Versions (please complete the following information):**

  • OS: Debian (Docker)
  • Sonic version: v1.3.5
  • Sonic client version: v0.0.5

David-Lor avatar Aug 12 '22 21:08 David-Lor

this issue has been fixed in https://github.com/xmonader/python-sonic-client/pull/14, can you publish the package to pypi please? @xmonader

wynemo avatar Jun 01 '23 08:06 wynemo

version 1.0.0 is released, sorry for the delay

xmonader avatar Jun 01 '23 13:06 xmonader