Skip to content

Commit

Permalink
Merge pull request #4276 from vespa-engine/hmusum/move-test-5
Browse files Browse the repository at this point in the history
Move test from internal repo
  • Loading branch information
hmusum authored Nov 18, 2024
2 parents 8659226 + 4376d6b commit 2369614
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions tests/search/streaming_long_bolding_match/mail.sd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
search mail {

document mail {

struct part {
# Text extracted from the body part, used for searching.
field text type string {
}

}

# The MIME parts recognized as "body"
field body type array<part> {

struct-field text {
indexing: index
match: prefix
}

}

}

fieldset default {
fields: body.text
}

document-summary default {
summary snippet {
dynamic
source: body.text
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<query-profile id="default">
<field name="maxHits">15000000</field>
<field name="maxOffset">15000000</field>
</query-profile>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright Vespa.ai. All rights reserved.
require 'rubygems'
require 'json'
require 'search_test'

require 'streaming_search_test'

class StreamingBongBoldingMatchTest < StreamingSearchTest

def setup
super
set_owner("vekterli")
end

def self.testparameters
{ "STREAMING" => { :search_type => "STREAMING" } }
end

def test_very_long_juniper_match
@valgrind=false
set_owner("vekterli")

deploy_app(singlenode_streaming_2storage(selfdir+"mail.sd").
search_chain(Provider.new("search", "local").
cluster("storage.mail").excludes("com.yahoo.search.searchers.InputCheckingSearcher")))
start

feedfile(selfdir+"juniper_bad_doc.json")

assert_hitcount_with_timeout(60, "streaming.userid=12345678&summary=default&query=%22Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+8RE%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Re%3A+Foo+and+bar%22", 1)
end

def teardown
stop
end

end

0 comments on commit 2369614

Please sign in to comment.