Releases: drnic/searchcraft
Releases · drnic/searchcraft
[v0.5.2]
[0.5.0] Unpopulated materialized views
You can now design materialized views and tag them to be build without data.
From the test_with_no_data.rb
file:
class NumberlessBuilder < SearchCraft::Builder
with_no_data
def view_select_sql
# Write SQL that produces 5 rows, with a 'number' column containing the number of the row
"SELECT generate_series(1, 5) AS number;"
end
end
class Numberless < ActiveRecord::Base
include SearchCraft::Model
end
And in the test:
assert !Numberless.populated?
# Refresh the materialized view
Numberless.refresh!
assert Numberless.populated?
assert_equal [1, 2, 3, 4, 5], Numberless.pluck(:number)
[0.4.2] - 2023-11-06
SEARCHCRAFT_DEBUG=true
is the same asSearchCraft.debug = true
and shows internal debugging of errors and activitiesSearchCraft.config.disable_annotate = true
to disable automatic annotation of models (which is enabled by default ifannotate_model
gem discovered)
Fixes:
SearchCraft.dependencies_ready?
(used on launch) is fixed for normal/default case whereexplicit_builder_class_names
not provided
tsvector helpers + RBS type signatures
-
SearchCraft::TextSearch
module added toBuilder
which providestsvector
helpers. Seetest_text_search.rb
for examples. -
RBS type signatures
-
Convenience
Config.explicit_builder_classes = {"Builder" => "Model"}
if you need to explicitly describe your Builder + Model classes and they are 1:1 -
Override default table name for
ViewHashStore
with:SearchCraft.configure do |config| config.view_hash_store_table_name = "'my_schema'.'my_table_name'"` end
Fixes:
- Fixes for users of
SearchCraft.config.explicit_model_class_names
on initialization
First public release
Welcome to SearchCraft!