woylie / flop

Filtering, ordering and pagination for Ecto
MIT License
629 stars 35 forks source link

Use tsvector for full text search, or allow custom filters #356

Open emarchak opened 1 year ago

emarchak commented 1 year ago

Is your feature request related to a problem? Please describe. We're looking to leverage tsvector for our full text search, but we really like Flop for all the param/filter handling that it can do.

Some discussion from the postgres documentation on why tsvector is awesome for full text search

Describe the solution you'd like This library might not want to tie itself directly to postgres, so one potential option is to allow us to roll some custom filters in the API. I scanned the hexdocs, but it doesn't look like there's support for that at the moment.

Describe alternatives you've considered We're very happy to contribute a PR to help unblock this issue, either for supporting tsvector or custom filters! Whatever supports the direction that Flop is looking to grow into.

Additional context

cc @nathan-yuen

woylie commented 1 year ago

Thanks for opening the issue. We have custom fields, which should allow you to model this: https://hexdocs.pm/flop/Flop.Schema.html#module-custom-fields

emarchak commented 1 year ago

Thanks! We'll give that a try!