aboutsummaryrefslogtreecommitdiffstats
path: root/notes
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-04-10 12:58:31 -0700
committerBryan Newbold <bnewbold@archive.org>2020-04-10 12:58:31 -0700
commit44f12b817be9d4ccd4b2c0c6ea07ea401ae86ffa (patch)
tree96198ef9af427718730c9ecc56eb731da54ba1cc /notes
parentee53062606c6d194c52013063c4ff414fc762a00 (diff)
downloadfatcat-covid19-44f12b817be9d4ccd4b2c0c6ea07ea401ae86ffa.tar.gz
fatcat-covid19-44f12b817be9d4ccd4b2c0c6ea07ea401ae86ffa.zip
add jupyter notebook and client notes
Diffstat (limited to 'notes')
-rw-r--r--notes/clients.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/notes/clients.md b/notes/clients.md
new file mode 100644
index 0000000..807bd7f
--- /dev/null
+++ b/notes/clients.md
@@ -0,0 +1,29 @@
+
+## Python Client
+
+Install (using a virtualenv, conda, whatever):
+
+ pip install jupyter matplotlib elasticsearch-dsl
+
+
+
+## Browser Javascript
+
+In short, *direct, rich, browser search queries will not work* because browser
+HTTP GET requests do not allow bodies, and this is the mechanism Elasticsearch
+uses to send complex queries. The search.fatcat.wiki endpoint currently blocks
+all POST requests for security reasons.
+
+This includes things like the elasticsearch-js/elasticsearch-browser client,
+and use from "notebooks" like observablehq.com, jsfiddle, etc.
+
+A subset of queries may work using only GET with URL parameters, for example
+X-Pack SQL queries.
+
+The resolution for this would be to implement proper read-only filtering of ES
+requests, either with middleware or upgrading ES and configuring access
+policies properly.
+
+Note: would import with something like:
+
+ elasticsearch = require('https://bundle.run/elasticsearch-browser@16.7.1');