- Notifications
You must be signed in to change notification settings - Fork8
sonic search backend client in python
License
NotificationsYou must be signed in to change notification settings
xmonader/python-sonic-client
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Python client forsonic search backend.
pip install sonic-client
fromsonicimportIngestClientwithIngestClient("127.0.0.1",1491,"password")asingestcl: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")
fromsonicimportSearchClientwithSearchClient("127.0.0.1",1491,"password")asquerycl:print(querycl.ping())print(querycl.query("wiki","articles","for"))print(querycl.query("wiki","articles","love"))print(querycl.suggest("wiki","articles","hell"))
fromsonicimportControlClientwithControlClient("127.0.0.1",1491,"password")ascontrolcl:print(controlcl.ping())controlcl.trigger("consolidate")
API documentation can be found atdocs/api and alsoBrowsable
asonic uses asyncio and this client doesn't. It grew out of needing to use sonic within gevent context
About
sonic search backend client in python
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.