nseaSeb

nseaSeb

Just published search_ash 0.5.0 (with search_core 0.4.0) on Hex.

What’s new: synonyms

You can now declare a synonym dictionary per language:

elixir

synonyms %{en: %{"cat" => ["kitten"]}}

Typing cat now builds a tsquery like (cat | kitten), matching documents whose search_text contains either. A few things worth knowing:

  • It’s dictionary-based, not semantic — the library doesn’t “know” cat and kitten are related, it applies exactly the mapping you give it.
  • It’s one-directional: "cat" => ["kitten"] means typing cat also finds kitten, not the reverse — add both directions if you want symmetry.
  • Stemming still applies on both sides, so plurals/inflections are handled automatically.
  • Synonyms only expand the full-text match + ranking (search_text/ts_rank) — they deliberately don’t affect the global-search label ranking tiers or fuzzy/typo matching, so an exact title match still ranks first.

This turns out to be pretty handy for domain acronyms too ("bl" => ["bon de livraison"], etc.) — not just lexical synonyms.

What’s fixed: a memory leak

Also fixed a subtle memory retention issue related to how Elixir handles large binaries — a small referenced binary was keeping a much larger one alive longer than necessary. Fixed by forcing a copy at the right point in the pipeline instead of holding a sub-binary reference.

Feedback welcome, as always — especially on the synonym API shape if anyone has strong opinions on bidirectional-by-default vs explicit.

repo: https://github.com/nseaSeb/search_ash

Showing Posts 1 to 2

vicb335

vicb335

Oh wow! Pretty nice!

nseaSeb

nseaSeb OP

0.7.0 published

Added

  • counts_by/4 numeric ranges — a :montant/amount-like column can now be faceted with ranges: [0, 100, 500] (at least two strictly increasing breakpoints), counted per half-open interval {low, high} (a value equal to a breakpoint falls in the upper interval). Completes the facet kinds started in 0.6.0 (scalar, array, date bucket). Ranges are always caller-declared, never discovered from data — unlike the other kinds’ :values discovery, there is nothing to read to find them, so no memory/latency cost on a broad query. Mutually exclusive with :bucket and :values.
— All posts loaded —

Where Next? Top

Trending in News & Updates Top

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
bartblast
I’ll be using this thread to share Hologram patch release announcements. Minor releases will continue to get dedicated threads with blog ...
New
sorenone
This release unifies configuration for queues, repos, and services, swaps opaque timing integers for readable durations, and backports pe...
New
pcharbon
:heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::hea...
New
nature
NatureWhistle v0.4.1 is out! :tada: This release is a pretty significant step forward for the project. When I first built NatureWhistle,...
New
webofbits
Aludel 0.7.0 is released :tada: Since 0.5.0, Aludel has grown into a much more complete LLM evaluation toolkit for Elixir and Phoenix app...
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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews