0
0

improved coverage

This commit is contained in:
Marty Schoch 2014-04-25 13:04:09 -06:00
parent 940f7c4e5d
commit 293fdb4c19

View File

@ -307,6 +307,58 @@ func TestTermBooleanSearch(t *testing.T) {
},
},
},
{
index: twoDocIndex,
query: &TermConjunctionQuery{
Terms: []Query{
&TermBooleanQuery{
Must: &TermConjunctionQuery{
Terms: []Query{
&TermQuery{
Term: "beer",
Field: "desc",
BoostVal: 1.0,
Explain: true,
},
},
Explain: true,
},
Should: &TermDisjunctionQuery{
Terms: []Query{
&TermQuery{
Term: "marty",
Field: "name",
BoostVal: 1.0,
Explain: true,
},
&TermQuery{
Term: "dustin",
Field: "name",
BoostVal: 1.0,
Explain: true,
},
},
Explain: true,
Min: 0,
},
Explain: true,
},
&TermQuery{
Term: "marty",
Field: "name",
BoostVal: 5.0,
Explain: true,
},
},
Explain: true,
},
results: []*DocumentMatch{
&DocumentMatch{
ID: "1",
Score: 3.5122335272516327,
},
},
},
}
for testIndex, test := range tests {