diff --git a/src/Nest.Tests.Integration/Core/Bulk/BulkPercolateTests.cs b/src/Nest.Tests.Integration/Core/Bulk/BulkPercolateTests.cs index f0644d0fa4f..25000d3c1ac 100644 --- a/src/Nest.Tests.Integration/Core/Bulk/BulkPercolateTests.cs +++ b/src/Nest.Tests.Integration/Core/Bulk/BulkPercolateTests.cs @@ -21,7 +21,7 @@ public void BulkIndexWithPercolate() .Term(f => f.Country, "netherlands") ) ); - + this._client.Refresh(); var descriptor = new BulkDescriptor(); // match against any doc @@ -54,7 +54,7 @@ public void BulkIndexWithPercolate() indexResponses.ElementAt(1).Id.Should().BeEquivalentTo("3"); indexResponses.ElementAt(1).Index.Should().BeEquivalentTo(ElasticsearchConfiguration.DefaultIndex); indexResponses.ElementAt(1).Type.Should().BeEquivalentTo(this._client.Infer.TypeName()); - indexResponses.First().Matches.Should().BeNull(); + indexResponses.ElementAt(1).Matches.Should().BeNull(); // cleanup this._client.UnregisterPercolator(query1); diff --git a/src/Nest.Tests.Integration/Core/Map/Properties/PropertiesTests.cs b/src/Nest.Tests.Integration/Core/Map/Properties/PropertiesTests.cs index 27a22dbca0b..2f2e04917ad 100644 --- a/src/Nest.Tests.Integration/Core/Map/Properties/PropertiesTests.cs +++ b/src/Nest.Tests.Integration/Core/Map/Properties/PropertiesTests.cs @@ -94,8 +94,8 @@ public void BooleanProperty() .Boolean(s => s .Name(p => p.BoolValue) //reminder .Name(string) exists too! .Boost(1.4) - .IncludeInAll() - .Index() + //.IncludeInAll() //makes no sense + //.Index() //since 0.90.5 this will throw an exception on elasticsearch. .IndexName("bool_name_in_lucene_index") .NullValue(false) .Store() diff --git a/src/Nest.Tests.Integration/Search/PercolateTests.cs b/src/Nest.Tests.Integration/Search/PercolateTests.cs index efbb332b13f..b5e34731bd7 100644 --- a/src/Nest.Tests.Integration/Search/PercolateTests.cs +++ b/src/Nest.Tests.Integration/Search/PercolateTests.cs @@ -132,7 +132,7 @@ public void PercolateTypedDocWithQuery() Assert.True(percolateResponse.IsValid); Assert.True(percolateResponse.OK); Assert.NotNull(percolateResponse.Matches); - Assert.True(percolateResponse.Matches.Contains(name)); + Assert.True(percolateResponse.Matches.Contains(name), percolateResponse.Matches.Count().ToString()); //should not match since we registered with the color blue percolateResponse = this._client.Percolate(p => p diff --git a/src/Nest.Tests.Integration/Search/QueryDSLTests.cs b/src/Nest.Tests.Integration/Search/QueryDSLTests.cs index 98b77b6d818..a737afa71de 100644 --- a/src/Nest.Tests.Integration/Search/QueryDSLTests.cs +++ b/src/Nest.Tests.Integration/Search/QueryDSLTests.cs @@ -146,9 +146,12 @@ public void TestPartialFields() [Test] public void TermSuggest() { + var country = this._client.Search(s => s.Size(1)).Documents.First().Country; + var wrongCountry = country + "x"; + var results = this._client.Search(s => s .Query(q => q.MatchAll()) - .TermSuggest("mySuggest", m => m.SuggestMode(SuggestMode.Always).Text("Sanskrti").Size(1).OnField("country")) + .TermSuggest("mySuggest", m => m.SuggestMode(SuggestMode.Always).Text(wrongCountry).Size(1).OnField("country")) ); Assert.NotNull(results); @@ -163,7 +166,9 @@ public void TermSuggest() Assert.NotNull(results.Suggest.Values.First().First().Options); Assert.GreaterOrEqual(results.Suggest.Values.First().First().Options.Count(), 1); - Assert.AreEqual(results.Suggest.Values.First().First().Options.First().Text, "Sanskrit"); + Assert.AreEqual(results.Suggest.Values.First().First().Options.First().Text, country); + + Assert.AreEqual(results.Suggest["mySuggest"].First().Options.First().Text, country); } [Test] diff --git a/src/Nest.Tests.Integration/Search/QueryResponseMapperTests.cs b/src/Nest.Tests.Integration/Search/QueryResponseMapperTests.cs index e907ba09b93..cfdc0785552 100644 --- a/src/Nest.Tests.Integration/Search/QueryResponseMapperTests.cs +++ b/src/Nest.Tests.Integration/Search/QueryResponseMapperTests.cs @@ -38,7 +38,7 @@ public void BogusQuery() Assert.False(queryResults.IsValid); var error = queryResults.ConnectionStatus.Error; Assert.NotNull(error); - Assert.True(error.HttpStatusCode == System.Net.HttpStatusCode.InternalServerError); + Assert.True(error.HttpStatusCode == System.Net.HttpStatusCode.BadRequest, error.HttpStatusCode.ToString()); } [Test]