{"repo":"kpanic/bombadil","free":true,"listed":false,"github":"https://github.com/kpanic/bombadil","clone":"git clone https://github.com/kpanic/bombadil.git","description":"You know, for (PostgreSQL) search","language":"Elixir","stars":27,"topics":["postgresql","bombadil","search","jsonb","fuzzy"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Bombadil You know, for (PostgreSQL) search Bombadil is a tiny wrapper around some PostgreSQL search capabilities. It supports exact match through PostgreSQL tsvector(s) and fuzzy search inside jsonb fields. Installation The package can be installed by adding bombadil to your list of dependencies in mix.exs: Documentation is at https://hexdocs.pm/bombadil Preparation Assuming that you have generated a migration with a \"search index\" table Basic Usage (Almost) Exact match of an indexed word or sequence of words Fuzzy match Match a specific field inside the indexed jsonb field (Almost) Exact match Fuzzy match Matching search results with an additional context Given a search index that has also an item id field as an additional context for filtering, let's suppose you index also the item id and you might have the same item id for another entry with different payload field like in this snippet: You can apply a search and a context to filter a specific id, in this case item id is 42 and the payload that is \"hiding\" is filtered out. Encoding to JSON Integration with your application Manual integration Define your schema (optional) Define your schema with a different column name If you want to use a different name for the payload field, you can define your schema in this way: Notice how the: specifies via the field macro another name for the :payload column Generate an Ecto migration Implement the migration Through configuration (via macros) Generate an Ecto migration Wire the Dynami","default_branch":null,"files":null,"tree":[],"storefront":"/r/kpanic","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kpanic/bombadil/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}