added test for nested conjunction searches
This commit is contained in:
parent
b78b1988a7
commit
b6ba2efdef
|
@ -150,6 +150,54 @@ func TestTermConjunctionSearch(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
index: twoDocIndex,
|
||||
query: &TermConjunctionQuery{
|
||||
Terms: []Query{
|
||||
&TermConjunctionQuery{
|
||||
Terms: []Query{
|
||||
&TermQuery{
|
||||
Term: "beer",
|
||||
Field: "desc",
|
||||
BoostVal: 1.0,
|
||||
Explain: true,
|
||||
},
|
||||
&TermQuery{
|
||||
Term: "mister",
|
||||
Field: "title",
|
||||
BoostVal: 5.0,
|
||||
Explain: true,
|
||||
},
|
||||
},
|
||||
Explain: true,
|
||||
},
|
||||
&TermConjunctionQuery{
|
||||
Terms: []Query{
|
||||
&TermQuery{
|
||||
Term: "couchbase",
|
||||
Field: "street",
|
||||
BoostVal: 1.0,
|
||||
Explain: true,
|
||||
},
|
||||
&TermQuery{
|
||||
Term: "mister",
|
||||
Field: "title",
|
||||
BoostVal: 5.0,
|
||||
Explain: true,
|
||||
},
|
||||
},
|
||||
Explain: true,
|
||||
},
|
||||
},
|
||||
Explain: true,
|
||||
},
|
||||
results: []*DocumentMatch{
|
||||
&DocumentMatch{
|
||||
ID: "2",
|
||||
Score: 2.7073553504667243,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for testIndex, test := range tests {
|
||||
|
|
Loading…
Reference in New Issue