View Source Bonfire.Search (Bonfire v0.9.11-social-beta.6)

An extension for Bonfire to handle:

  • Search indexing
  • Ultra-fast search
  • LiveView search UI

You can implement adapters for your prefered search backend. Currently adapters are included for:

Development & Deployment Documentation

This extension is meant to be used inside of a Bonfire app, so please refer to the main repo at: https://github.com/bonfire-networks/bonfire-app

Copyright (c) 2020 Bonfire Contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Summary

Functions

Returns the configured search adapter module. Defaults to DB Adapter if no adapter configured or if adapter is disabled.

Search with simplified options

Main search function supporting facets and filtering

Type-specific search with optional facets

Functions

adapter()

Returns the configured search adapter module. Defaults to DB Adapter if no adapter configured or if adapter is disabled.

maybe_boundarise(hits, arg2, opts)

search(string, opts \\ [])

Search with simplified options

search(string, opts \\ %{}, calculate_facets, filter_facets)

Main search function supporting facets and filtering

search_by_type(tag_search, facets \\ nil, opts \\ [])

Type-specific search with optional facets