# Terms with a list of elements to match

**URL:** <https://discuss.elastic.co/t/terms-with-a-list-of-elements-to-match/129563>\
**Category:** Elasticsearch\
**Created:** [April 25, 2018, 8:26pm UTC](https://discuss.elastic.co/t/terms-with-a-list-of-elements-to-match/129563 "2018-04-25T20:26:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![r1go](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/r1go/32/30491_2.png) [@r1go](https://discuss.elastic.co/u/r1go)\
**Post date:** [April 25, 2018, 8:26pm UTC](https://discuss.elastic.co/t/terms-with-a-list-of-elements-to-match/129563/1 "2018-04-25T20:26:28Z")

</div>

Hi there!  
Just me trying my first steps with Elastic Search.  
Im writing some C# code and what i need it is to match many terms with some ID at Elastic S.

Im trying something like these, but woth out no results 😔

var list = ["20","26",".....] -\> List of Id´s to match

var result3 = client.Search(e =\> e.Query(  
p =\> p.ConstantScore(  
f =\> f.Filter(  
t =\> t.Term("RuleID", list))  
)  
));

var result4 = client.Search(e =\> e.Query(  
q =\> q.Terms(  
p =\> p  
.Name("pepe")  
.Boost(1.1)  
.Field(f =\> f.RuleID)  
.Terms(list))));

var result = client.Search(e =\> e.Query(q =\> q.Terms(d =\> d.Field(c =\> c.RuleID).Terms(list))));

Just to be sure, when i call with these one, i get the results:

var result2 = client.Search(e =\> e.Query(p =\> p.MatchAll()).From(0).Size(23));

Can someone help me?  
I´ve been diving into ES documentation, but no success at all.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 23, 2018, 8:26pm UTC](https://discuss.elastic.co/t/terms-with-a-list-of-elements-to-match/129563/2 "2018-05-23T20:26:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
