Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/more_like_this/more_like_this.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def demo_advanced_mlt_options
min_term_freq: 1,
max_query_terms: 12,
min_doc_freq: 1,
max_term_freq: 100,
max_doc_freq: 10_000,
min_word_length: 3,
max_word_length: 20,
Expand Down
4 changes: 0 additions & 4 deletions lib/parade_db/search_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ module SearchMethods
max_query_terms: :max_query_terms,
min_doc_freq: :min_doc_frequency,
min_doc_frequency: :min_doc_frequency,
max_term_freq: :max_term_frequency,
max_term_frequency: :max_term_frequency,
max_doc_freq: :max_doc_frequency,
max_doc_frequency: :max_doc_frequency,
min_word_length: :min_word_length,
Expand All @@ -25,7 +23,6 @@ module SearchMethods
min_term_frequency
max_query_terms
min_doc_frequency
max_term_frequency
max_doc_frequency
min_word_length
max_word_length
Expand All @@ -34,7 +31,6 @@ module SearchMethods
min_term_frequency
max_query_terms
min_doc_frequency
max_term_frequency
max_doc_frequency
min_word_length
max_word_length
Expand Down
3 changes: 1 addition & 2 deletions spec/user_api_unit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,13 @@ class Category < ActiveRecord::Base
min_term_freq: 2,
max_query_terms: 10,
min_doc_freq: 1,
max_term_freq: 20,
max_doc_freq: 200,
min_word_length: 3,
max_word_length: 15,
stopwords: %w[the a]
).to_sql

expected = %(SELECT products.* FROM products WHERE ("products"."id" @@@ pdb.more_like_this(5, ARRAY['description'], min_term_frequency => 2, max_query_terms => 10, min_doc_frequency => 1, max_term_frequency => 20, max_doc_frequency => 200, min_word_length => 3, max_word_length => 15, stopwords => ARRAY['the', 'a'])))
expected = %(SELECT products.* FROM products WHERE ("products"."id" @@@ pdb.more_like_this(5, ARRAY['description'], min_term_frequency => 2, max_query_terms => 10, min_doc_frequency => 1, max_doc_frequency => 200, min_word_length => 3, max_word_length => 15, stopwords => ARRAY['the', 'a'])))
assert_sql_equal expected, sql
end
it "more like this key extraction does not fallback to id for non-id key fields" do
Expand Down
Loading