diff --git a/scenariolib/event_searchandclick.go b/scenariolib/event_searchandclick.go index eb84d45..cca8b0f 100644 --- a/scenariolib/event_searchandclick.go +++ b/scenariolib/event_searchandclick.go @@ -13,7 +13,7 @@ import ( // SearchAndClickEvent represents a search event followed by a click on a specific // document found by the title type SearchAndClickEvent struct { - Query string `json:"query"` + Query string `json:"queryText"` Probability float64 `json:"probability"` DocTitle string `json:"docClickTitle,omitempty"` MatchField string `json:"matchField,,omitempty"` diff --git a/scenariolib/event_searchandclick_test.go b/scenariolib/event_searchandclick_test.go index 2d7f8ab..faf5a4c 100644 --- a/scenariolib/event_searchandclick_test.go +++ b/scenariolib/event_searchandclick_test.go @@ -8,7 +8,7 @@ import ( ) func TestSearchAndClickEventValid(t *testing.T) { - var testEventJson = []byte(`{"query": "queryTextTest", "probability": 0.5, "docClickTitle": "docTitleTest", "quickview": false, "caseSearch": false, "inputTitle": "inputTitleTest", "customData": {"data1": "one"}}`) + var testEventJson = []byte(`{"queryText": "queryTextTest", "probability": 0.5, "docClickTitle": "docTitleTest", "quickview": false, "caseSearch": false, "inputTitle": "inputTitleTest", "customData": {"data1": "one"}}`) event := &scenariolib.SearchAndClickEvent{} // Test unmarshal json.