engineeringdept

engineeringdept

I’ve just released the first version of Snap, an Elasticsearch client. It borrows ideas about application structure and process management from Ecto, as well as a DSL-free nature and zero-downtime index management from Elasticsearch.

It adds support for using Streams to perform bulk operations against an index, as well as emitting Telemetry events.

It’s new and probably not production ready yet. I expect to introduce it into a production environment in the coming weeks, and expect some changes will follow.

Please feel free to kick the tyres on it, and see if it’s useful for you. Feedback welcome!

Showing Posts 1 to 8

cenotaph

cenotaph

Did you make any further progress on this?

engineeringdept

engineeringdept OP

Hi there - the library is in production use and has been actively developed since my posting. I believe other people are also using it now.

Werner

Werner

Am looking for an Elasticsearch library, which ones are currently in productive use and under active development? At the moment probably the above mentioned Snap and Elasticsearch or not?

What are the main differences between these two?
Thanks and best regards,
Werner.

engineeringdept

engineeringdept OP

I’ve just released 0.5.0 which includes a bunch of improvements since my last post from other users of the library - see the CHANGELOG. Thanks to everyone who has contributed!

engineeringdept

engineeringdept OP

0.6.0 is out which supports the ability to swap HTTP clients, allowing mock HTTP clients for testing, or to use your preferred HTTP client for whatever reason. It still defaults to using Finch.

Full changelog here: snap/CHANGELOG.md at main · breakroom/snap · GitHub

bdarla

bdarla

Is there a way to query elasticsearch by mixing slop and wildcards for full-text search?
I mean to make a query such “(comput* inform*)~5” and return documents that comprise words such as computer and information wherein they appear close to each other in the text, i.e. maximum 5 words distance.

bdarla

bdarla

I managed to find out how to draft such queries. In case someone might also needs to make such queries, I provide an example below, that can be provided to Snap:

query = %{
      query: %{
        span_near: %{
          clauses: [
            %{
              span_multi: %{
                match: %{
                  wildcard: %{
                    "doc.values.description": %{
                      value: "comput*"
                    }
                  }
                }
              }
            },
            %{
              span_multi: %{
                match: %{
                  wildcard: %{
                    "doc.values.description": %{
                      value: "inform*"
                    }
                  }
                }
              }
            }
          ],
          slop: 14,
          in_order: false
        }
      }
    }
engineeringdept

engineeringdept OP

I’ve just released Snap 0.9.0, which adds support for the Document API in Snap.Document, exposes a Snap.Search.count function for counting documents in an index, and some quality of life and testing improvements with an index namespacing feature.

The index namespacing feature allows a Snap.Cluster to be isolated on a per-application or per-environment basis so you can have your dev environment indexes be prefixed with dev- and your test environment be prefixed with test- etc.

It also allows us to isolate indexes on a per-process basis, which enables asynchronous tests to be isolated from each other, so they operate on their own view of the cluster’s indexes. This is similar to how Ecto sandboxing works, but within the constraints of ElasticSearch/OpenSearch which doesn’t support transactions.

This makes it possible to set async: true in your tests which is often a nice performance improvement.

I’m really open to feedback on this API - let me know if it does what you expect, in the way you expect it!

For more details see Snap.Cluster.Namespace and Snap.Test.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews