Skip to content

Releases: drnic/searchcraft

[v0.5.2]

23 Apr 00:55
Compare
Choose a tag to compare
  • refresh_all! uses SearchCraft.config.explicit_model_class_names if present
  • Removed ruby 3.0 from CI

[0.5.0] Unpopulated materialized views

29 Feb 23:07
Compare
Choose a tag to compare

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

06 Nov 04:05
Compare
Choose a tag to compare
  • SEARCHCRAFT_DEBUG=true is the same as SearchCraft.debug = true and shows internal debugging of errors and activities
  • SearchCraft.config.disable_annotate = true to disable automatic annotation of models (which is enabled by default if annotate_model gem discovered)

Fixes:

  • SearchCraft.dependencies_ready? (used on launch) is fixed for normal/default case where explicit_builder_class_names not provided

tsvector helpers + RBS type signatures

31 Oct 21:50
Compare
Choose a tag to compare
  • SearchCraft::TextSearch module added to Builder which provides tsvector helpers. See test_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

23 Oct 23:11
Compare
Choose a tag to compare

Welcome to SearchCraft!