File tree Expand file tree Collapse file tree 3 files changed +82
-0
lines changed
src/Tests/Nest.Tests.Unit Expand file tree Collapse file tree 3 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 371371 <Compile Include =" QueryParsers\Visitor\DslPrettyPrintVisitor.cs" />
372372 <Compile Include =" QueryParsers\Visitor\VisitorDemoUseCase.cs" />
373373 <Compile Include =" QueryParsers\Visitor\VisitorTests.cs" />
374+ <Compile Include =" Reproduce\Reproduce928Tests.cs" />
374375 <Compile Include =" Reproduce\Reproduce902Tests.cs" />
375376 <Compile Include =" Reproduce\Reproduce646Tests.cs" />
376377 <Compile Include =" Reproduce\Reproduce579Tests.cs" />
775776 <None Include =" Reproduce\Issue579.json" >
776777 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
777778 </None >
779+ <None Include =" Reproduce\Issue928.json" >
780+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
781+ </None >
778782 <None Include =" Reproduce\Issue902.json" >
779783 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
780784 </None >
Original file line number Diff line number Diff line change 1+ {
2+ "filter" : {
3+ "bool" : {
4+ "must" : [
5+ {
6+ "fquery" : {
7+ "query" : {
8+ "term" : {
9+ "field1" : {
10+ "value" : " value"
11+ }
12+ }
13+ },
14+ "_cache" : true
15+ }
16+ },
17+ {
18+ "fquery" : {
19+ "query" : {
20+ "term" : {
21+ "field2" : {
22+ "value" : " value"
23+ }
24+ }
25+ },
26+ "_cache" : true
27+ }
28+ }
29+ ]
30+ }
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Reflection ;
5+ using Nest . Tests . MockData . Domain ;
6+ using NUnit . Framework ;
7+
8+ namespace Nest . Tests . Unit . Reproduce
9+ {
10+ /// <summary>
11+ /// tests to reproduce reported errors
12+ /// </summary>
13+ [ TestFixture ]
14+ public class Reproduce928Tests : BaseJsonTests
15+ {
16+ [ Test ]
17+ public void Issue928 ( )
18+ {
19+ var result = this . _client . Search < ElasticsearchProject > ( s => s
20+ . Filter ( f => f
21+ . Bool ( bf => bf
22+ . Must (
23+ mf => mf . Cache ( true ) . Query ( q => q . Term ( "field1" , "value" ) )
24+ , mf => mf . Cache ( true ) . Query ( q => q . Term ( "field2" , "value" ) )
25+ )
26+ )
27+ )
28+ ) ;
29+
30+ this . JsonEquals ( result . ConnectionStatus . Request , MethodBase . GetCurrentMethod ( ) ) ;
31+ }
32+
33+ [ Test ]
34+ public void Issue928_And ( )
35+ {
36+ var result = this . _client . Search < ElasticsearchProject > ( s => s
37+ . Filter ( f =>
38+ f . Cache ( true ) . Query ( q => q . Term ( "field1" , "value" ) )
39+ && f . Cache ( true ) . Query ( q => q . Term ( "field2" , "value" ) )
40+ )
41+ ) ;
42+
43+ this . JsonEquals ( result . ConnectionStatus . Request , MethodBase . GetCurrentMethod ( ) , "Issue928" ) ;
44+ }
45+ }
46+ }
You can’t perform that action at this time.
0 commit comments