File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Tests/Nest.Tests.Integration/Search Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ public interface IQueryContainer : ICustomJson
7777 [ JsonConverter ( typeof ( CompositeJsonConverter < GeoShapeQueryJsonReader , FieldNameQueryConverter < EnvelopeGeoShape > > ) ) ]
7878 IGeoShapeQuery GeoShape { get ; set ; }
7979
80- [ JsonProperty ( PropertyName = "common_terms " ) ]
80+ [ JsonProperty ( PropertyName = "common " ) ]
8181 [ JsonConverter ( typeof ( FieldNameQueryConverter < CommonTermsQuery > ) ) ]
8282 ICommonTermsQuery CommonTerms { get ; set ; }
8383
Original file line number Diff line number Diff line change @@ -132,6 +132,21 @@ public void TestTermFacet()
132132 Assert . Greater ( results . FacetItems < TermItem > ( f => f . Country ) . Count ( ) , 0 ) ;
133133 }
134134
135+ [ Test ]
136+ public void TestCommonTerms ( )
137+ {
138+ var results = this . Client . Search < ElasticsearchProject > ( s => s
139+ . Query ( q => q
140+ . CommonTerms ( t => t
141+ . OnField ( p => p . Name )
142+ . Query ( "elasticsearch" )
143+ )
144+ )
145+ ) ;
146+
147+ Assert . True ( results . IsValid ) ;
148+ Assert . Greater ( results . Hits . Count ( ) , 0 ) ;
149+ }
135150
136151 [ Test ]
137152 public void TermSuggest ( )
You can’t perform that action at this time.
0 commit comments