matthias.oberleitner

matthias.oberleitner

Hi, I’m evaluating Ash as a foundation for our future business applications.

So far I love it, and there’s just one usecase I haven’t been able to solve yet.

We’d like to be have a search bar where we can search across multiple resources and multiple of their attributes. It would be a real banger if we could use the security aspects of ashs resources with policies and field policies applied to that search, so you don’t have to reimplement it manually in an external system like typesense / elasticsearch, and you can’t accidentally find something in the search you’re not supposed to be able to see.

Has anyone done anything like this? Either in the postgres db attached, or with an external search engine like typesense / elasticsearch etc.

For the DX I would imagine having an extra block in the resources something like…

global_search do
  indexed_attributes :product_description, :product_slug, :product_number
  index_functions # add a function where the resource gets passed and you can return extra fields etc
end

(note I haven’t touched elixir in 2 years where I just learned it for a couple months in my spare time, so see this as pseudo code ^^)

Showing Posts 1 to 3

dbaer

dbaer

Hi Matthias, I recalled a library yesterday that already supports this but had to find it again: Search_ash - multilingual Postgres full-text search for Ash

nseaSeb

nseaSeb

Thanks a lot; I set this up for an Ash project, in a context where I didn’t want to use Elasticsearch. Feel free to contribute if you’d like, or to let me know about any bugs or missing features.
Wishing you all the very best.

manhvu

manhvu

Currently, I haven’t found any library that supports this feature. So, I built my own full-text search engine and used Ash notifications to keep the search documents in sync with resource changes (insert/update).

I also developed AshScylla, which includes a lightweight search engine built on ScyllaDB using an inverted index.

However, this was built to meet my MVP requirements, so it still needs more testing in production.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
yarrichar
I’m very new to Elixir, so sorry if this is a silly question: I am wondering what happens to the mailbox of a process when the machine i...
New
pragdave
How do I tell Hologram not to escape HTML when substituting into templates? {Textile.render(@product.long_description)} escapes the HTM...
New
Fl4m3Ph03n1x
Background When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error: * assembling mark...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
rlipscombe
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews