Khafra (khafra_search v0.3.0)
Khafra: The distributed search deployment platform
Link to this section Summary
Functions
Create a table using configured strategy and options
Remove all tables. Generally for testing. This drops for the current node only
Insert, creating table if it does not exist yet
Derive the regular table name into the distributed name khafra standardizes
Taking a query from an ORM or SQL struct build a giza query to a distributed table using the standardized khafra naming. Takes advantage of giza passthrough to ignore nil values. Note that depending on SearchBehaviour fields indexed, some queries would fail such as asking to constrain where on a field not existing in the search index.
Get Observer state; list of search tables
Get a search tables state from the schema it backs
Works off a struct which represents a table name and fills all search rows. Note this can be an expensive operation on large tables; use options to schedule work if necessary.
Trigger jigged maintenance on all registered table servers
Update an entries full fields
Link to this section Functions
create_table(schema, opts \\ [])
Create a table using configured strategy and options
destroy_all()
Remove all tables. Generally for testing. This drops for the current node only
insert(result, opts \\ [])
Insert, creating table if it does not exist yet
into_distributed_name(name)
Derive the regular table name into the distributed name khafra standardizes
match(table_or_query, opts \\ [])
Taking a query from an ORM or SQL struct build a giza query to a distributed table using the standardized khafra naming. Takes advantage of giza passthrough to ignore nil values. Note that depending on SearchBehaviour fields indexed, some queries would fail such as asking to constrain where on a field not existing in the search index.
Supports
- Ecto
- https://github.com/elixir-dbvisor/sql
- Manual table call
peek(atom)
Get Observer state; list of search tables
peek(atom, schema)
Get a search tables state from the schema it backs
refresh_table(schema, opts \\ [])
Works off a struct which represents a table name and fills all search rows. Note this can be an expensive operation on large tables; use options to schedule work if necessary.
trigger_maintenance()
Trigger jigged maintenance on all registered table servers
update(result, opts \\ [])
Update an entries full fields