Skip to content

Code inside Filter executes twice #2101

@SLavrynenko

Description

@SLavrynenko

NEST/Elasticsearch.Net version:
2.3.1

Elasticsearch version:
"version" : {
"number" : "2.1.1",
"build_hash" : "40e2c53a6b6c2972b3d13846e450e66f4375bd71",
"build_timestamp" : "2015-12-15T13:05:55Z",
"build_snapshot" : false,
"lucene_version" : "5.3.1"
},

Description of the problem including expected versus actual behavior:
I've the following code:

            var response = client.Search<ContactElastic>(
                s => s.Query(
                    q => q.Bool(
                    b => b
                        .Filter(f =>
                        {
                            var filter = f.Term(p => p.ClientId, 1);

                            return filter;
                        }))));

But I see that code inside Filter executes twice, why? Here is a simple code but inside my Filter side I've a sophisticated code that shouldn't to run twice.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions