Skip to content

Commit

Permalink
Merge pull request #103 from coveo/jdevost-improvements
Browse files Browse the repository at this point in the history
Use queryText in SearchAndClick (as Search)
  • Loading branch information
jdevost authored Oct 17, 2018
2 parents 42c3997 + 46e1f4c commit 18c387c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scenariolib/event_searchandclick.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion scenariolib/event_searchandclick_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 18c387c

Please sign in to comment.