nestauk / clio-lite Goto Github PK
View Code? Open in Web Editor NEWLightweight intelligent searching of elasticsearch data
Lightweight intelligent searching of elasticsearch data
I really liked your blogpost and started trying to use your package. But I get a TypeError when I call clio_search
. Specifically, I get the following error:
File "./query_elastic_search.py", line 23, in <module>
main()
File "./query_elastic_search.py", line 18, in main
total, docs = clio_search(es_url, index=index, query="shotgun")
File "/home/ubuntu/.pyenv/versions/3.7.0/lib/python3.7/site-packages/clio_lite.py", line 288, in clio_search
**kwargs)
File "/home/ubuntu/.pyenv/versions/3.7.0/lib/python3.7/site-packages/clio_lite.py", line 134, in more_like_this
max_doc_freq = int(max_doc_frac*total)
TypeError: unsupported operand type(s) for *: 'float' and 'dict'
Can this be fixed?
Hi there,
I have just tried to set up clio-lite and am struggling to get the basic search running.
I have one entry available in Elasticsearch but clio-lite does not return it (it returns "(0, [])").
The search works fine if I run it in Kibana:
GET /customer/_search { "query": {"bool": {"must": [{"multi_match": {"query": "john doe", "fields": []}}], "filter": []}} }
This is my Python code:
from clio_lite import clio_search
url = "http://localhost:9200"
index = "customer"
query = "john doe"
print(clio_search(url=url, index=index, query=query))
What am I doing wrong?
Thanks in advance.
Dear colleague,
In the interest of Nesta's charitable objects we recommend that you set an Open Source license. For more information, please read our guidelines.
Kind regards,
NestaBot
Assuming one was going to use searchkit at the front-end, I assume one would:
I would welcome some additional illumination. Thanks in advance!
Are you able to add an auth param in the request?
I must be missing something fundamental. Using a virtual env with python 2.7 on ubuntu 20.04...
I am trying to use clio-lite to connect searchkit with an existing ES instance protected with IAM policies only. The deploy.sh script looks for multiple config files in the /config folder but only one exists (range_upper_limit). I tried adding blank files and also individual files with the es domain hyperlink (https://foo) and a toy function name. Also file contents in quotations. Errors return that the 1. the files need an item (aws: error: argument --function-name: expected one argument) or 2. they are not in the right format. Should these be in json format {"function_name":"foo_function"} and {"allowed_endpoints":"foo_endpoint"}?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.