protected override void ExpectResponse(DeleteByQueryResponse response) { response.Task.Should().NotBeNull(); response.Task.TaskNumber.Should().BeGreaterThan(0); response.Task.NodeId.Should().NotBeNullOrWhiteSpace(); response.Task.FullyQualifiedId.Should().NotBeNullOrWhiteSpace(); }
protected override void ExpectResponse(DeleteByQueryResponse response) { response.Took.Should().BeGreaterThan(0); response.Total.Should().Be(1); response.Deleted.Should().Be(1); response.Retries.Should().NotBeNull(); response.Retries.Bulk.Should().Be(0); response.Retries.Search.Should().Be(0); response.RequestsPerSecond.Should().Be(-1); response.Failures.Should().BeEmpty(); }
protected override void ExpectResponse(DeleteByQueryResponse response) { response.VersionConflicts.Should().Be(1); response.Failures.Should().NotBeEmpty(); var failure = response.Failures.First(); failure.Index.Should().NotBeNullOrWhiteSpace(); failure.Status.Should().Be(409); failure.Id.Should().NotBeNullOrWhiteSpace(); failure.Cause.Should().NotBeNull(); failure.Cause.IndexUUID.Should().NotBeNullOrWhiteSpace(); failure.Cause.Reason.Should().NotBeNullOrWhiteSpace(); failure.Cause.Index.Should().NotBeNullOrWhiteSpace(); failure.Cause.Shard.Should().NotBeNull(); failure.Cause.Type.Should().NotBeNullOrWhiteSpace(); }
protected override void ExpectResponse(DeleteByQueryResponse response) { response.ShouldBeValid(); response.SliceId.Should().Be(0); // Since we only executed one slice of the two, some of the documents that // match the query will still exist. Client.Refresh(CallIsolatedValue); var countResponse = Client.Count <Project>(c => c .Index(CallIsolatedValue) .Query(q => q .Terms(m => m .Field(p => p.Name) .Terms(FirstTenProjectNames) ) ) ); countResponse.Count.Should().BeGreaterThan(0); }
public DeleteByQueryResponse DeleteByQuery <T>(string indexName, Func <TermQueryDescriptor <T>, ITermQuery> selector) where T : class { DeleteByQueryResponse deleteByQueryResponse = elasticClient.DeleteByQuery <T>(s => s.Index(indexName.ToLower()).Query(q => q.Term(selector))); return(deleteByQueryResponse); }