-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4276 from vespa-engine/hmusum/move-test-5
Move test from internal repo
- Loading branch information
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
tests/search/streaming_long_bolding_match/juniper_bad_doc.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
|
||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
tests/search/streaming_long_bolding_match/search/query-profiles/default.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
37 changes: 37 additions & 0 deletions
37
tests/search/streaming_long_bolding_match/streaming_long_bolding_match.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |