We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried without success to use snap from a Livebook. (also referenced in #94 ).
snap
I installed finch (instead of Req) and run an OpenSearch image:
finch
Req
docker pull opensearchproject/opensearch:latest docker pull opensearchproject/opensearch-dashboards:latest docker run -d --name opensearch \ -p 9200:9200 -p 9600:9600 \ -e "discovery.type=single-node" \ -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=a K 12 3 45 6 78 9?" \ -e "cluster.name=my-cluster" \ -e "node.name=node1" \ -v open-search:/usr/share/opensearch/data \ opensearchproject/opensearch:latest
The Livebook:
Mix.install([{:snap, "~> 0.11"}, {:finch, "~> 0.19"}]) defmodule MyApp.Cluster do use Snap.Cluster, opt_app: :noop end Finch.start_link(name: MyFinch) {:ok, _} = Kino.start_child( {MyApp.Cluster, [ url: "http://localhost:9200", username: "admin", password: "a K 12 3 45 6 78 9#" ] } )
I create an index and define a map with two fields "title" and "chunk_text" of type "text":
map = %{ "mappings" => %{ "properties" => %{ "title" => %{"type" => "text"}, "chunk_text" => %{ "type" => "text", "fields" => %{ "raw" => %{"type" => "keyword"} } } } } } Snap.Indexes.create(MyApp.Cluster, "my-index", map)
I get in the Livebook:
{:error, %Snap.HTTPClient.Error{reason: :closed, origin: %Mint.TransportError{reason: :closed}}}
and in the terminal (running livebook server)
livebook server
[debug] Elasticsearch GET request path=/my-index/_doc status= response=12ms decode=0ms total=12ms
Besides the connection failure, the create index documentation indicates a PUT request whilst this generates GET request.
PUT
GET
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried without success to use
snap
from a Livebook. (also referenced in #94 ).I installed
finch
(instead ofReq
) and run an OpenSearch image:The Livebook:
I create an index and define a map with two fields "title" and "chunk_text" of type "text":
I get in the Livebook:
{:error, %Snap.HTTPClient.Error{reason: :closed, origin: %Mint.TransportError{reason: :closed}}}
and in the terminal (running
livebook server
)[debug] Elasticsearch GET request path=/my-index/_doc status= response=12ms decode=0ms total=12ms
Besides the connection failure, the create index documentation indicates a
PUT
request whilst this generatesGET
request.The text was updated successfully, but these errors were encountered: