SearchCore (search_core v0.1.0)

Copy Markdown View Source

Multilingual full-text search building blocks for plain Elixir/Ecto — no Ash required.

Two responsibilities:

  • SearchCore.Pipeline — turn raw text into normalized, stemmed tokens (via the Stemmers Rust NIF, French and the full Snowball set included).
  • SearchCore.Tsvector — turn those tokens into the search_text you index and the tsquery you search with, both from the same pipeline so index and query never drift apart.

This module is a thin facade over those two. See SearchCore.Tsvector for the Postgres wiring (to_tsvector('simple', …) / to_tsquery('simple', …)).

iex> SearchCore.searchable_text("Les chevaux mangent", :french)
"cheval mangent"

iex> SearchCore.tsquery("chevaux", :french)
"cheval"

Summary

Functions

process(text, lang, opts \\ [])

See SearchCore.Pipeline.process/3.

searchable_text(text, lang, opts \\ [])

See SearchCore.Tsvector.searchable_text/3.

tsquery(query, lang, opts \\ [])

See SearchCore.Tsvector.tsquery/3.