Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to currently expected behavior #4213

Merged
merged 1 commit into from
Oct 3, 2024
Merged
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
43 changes: 37 additions & 6 deletions tests/search/multicluster/multicluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,47 @@ def test_2_clusters_2_doc_types_field_name_equal_except_case
feed_music_documents

[:yql, :vespa].each do |query_language|
["title", "TITLE"].each do |field|
["Surfer", "Dummy"].each do |term|
["cluster1,cluster2", nil].each do |s|
query = create_query(query_language, field, term, s)
puts "Query: #{CGI.unescape(query)}"
search_and_assert_hitcount(query, 1)
["artist"].each do |field|
["Pixies", "Portishead"].each do |term|
["cluster1,cluster2", nil].each do |sources|
expect_hits(query_language, field, term, sources, 1)
end
end
end
end
# with YQL we get: Field 'ARTIST' does not exist.
expect_hits(:yql, "ARTIST", "Pixies", nil, 0)
expect_hits(:vespa, "ARTIST", "Pixies", nil, 1)
[:yql, :vespa].each do |query_language|
["title"].each do |field|
["Surfer"].each do |term|
["cluster1", "cluster1,cluster2", nil].each do |sources|
expect_hits(query_language, field, term, sources, 1)
end
end
end
end
# only field 'TITLE' contains 'dummy'
expect_hits(:yql, "title", "dummy", nil, 0)
expect_hits(:vespa, "title", "dummy", nil, 0)
[:yql, :vespa].each do |query_language|
["TITLE"].each do |field|
["Dummy"].each do |term|
["cluster2", "cluster1,cluster2", nil].each do |sources|
expect_hits(query_language, field, term, sources, 1)
end
end
end
end
# only field 'title' contains 'Surfer'
expect_hits(:yql, "TITLE", "Surfer", nil, 0)
expect_hits(:vespa, "TITLE", "Surfer", nil, 0)
end

def expect_hits(query_language, field, term, sources, numhits)
query = create_query(query_language, field, term, sources)
puts "Query: #{CGI.unescape(query)}"
search_and_assert_hitcount(query, numhits)
end

def create_query(query_language, field, term, sources)
Expand Down