File tree Expand file tree Collapse file tree 3 files changed +74
-0
lines changed
src/Tests/Nest.Tests.Unit Expand file tree Collapse file tree 3 files changed +74
-0
lines changed Original file line number Diff line number Diff line change 368368 <Compile Include =" QueryParsers\Visitor\DslPrettyPrintVisitor.cs" />
369369 <Compile Include =" QueryParsers\Visitor\VisitorDemoUseCase.cs" />
370370 <Compile Include =" QueryParsers\Visitor\VisitorTests.cs" />
371+ <Compile Include =" Reproduce\Reproduce902Tests.cs" />
371372 <Compile Include =" Reproduce\Reproduce646Tests.cs" />
372373 <Compile Include =" Reproduce\Reproduce579Tests.cs" />
373374 <Compile Include =" Reproduce\Reproduce860Tests.cs" />
769770 <None Include =" Reproduce\Issue579.json" >
770771 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
771772 </None >
773+ <None Include =" Reproduce\Issue902.json" >
774+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
775+ </None >
772776 <None Include =" Reproduce\Issue876.json" >
773777 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
774778 </None >
Original file line number Diff line number Diff line change 1+ {
2+ "query" : {
3+ "match" : {
4+ "name" : {
5+ "query" : " "
6+ }
7+ }
8+ }
9+ }
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 NUnit . Framework ;
6+
7+ namespace Nest . Tests . Unit . Reproduce
8+ {
9+ /// <summary>
10+ /// tests to reproduce reported errors
11+ /// </summary>
12+ [ TestFixture ]
13+ public class Reproduce902 : BaseJsonTests
14+ {
15+ [ ElasticType ( Name = "testclass" ) ]
16+ public class TestClass
17+ {
18+ public int Id { get ; set ; }
19+
20+ public NestedClass NestMe { get ; set ; }
21+ }
22+
23+ public class NestedClass
24+ {
25+ public string NestedMultiField { get ; set ; }
26+ }
27+
28+ public class ChildRecord
29+ {
30+
31+ }
32+
33+ /// <summary>
34+ /// https://github.com/Mpdreamz/NEST/issues/902
35+ /// </summary>
36+ [ Test ]
37+ public void Issue902 ( )
38+ {
39+ var mapResult = this . _client . Map < TestClass > ( m => m
40+ . MapFromAttributes ( )
41+ . Properties ( props => props
42+ . NestedObject < NestedClass > ( nested => nested
43+ . Name ( p=> p . NestMe )
44+ . Properties ( nestedProps=> nestedProps
45+ . MultiField ( s => s
46+ . Name ( p => p . NestedMultiField )
47+ . Fields ( fields => fields
48+ . String ( ps => ps . Name ( p => p . NestedMultiField . Suffix ( "raw" ) ) . Index ( FieldIndexOption . NotAnalyzed ) )
49+ . String ( ps => ps . Name ( p => p . NestedMultiField ) . Index ( FieldIndexOption . Analyzed ) )
50+ )
51+ )
52+ )
53+ )
54+ )
55+ ) ;
56+ var json = mapResult . ConnectionStatus . Request ;
57+ this . JsonEquals ( json , MethodBase . GetCurrentMethod ( ) ) ;
58+ }
59+
60+ }
61+ }
You can’t perform that action at this time.
0 commit comments