Using the object initializer syntax, on the line that define the Terms, I am getting an error: Cannot convert source type 'System.Collections.Generic.List<int>' to target type 'System.Collections.Generic.IEnumerable<object>'
var query = new TermsQuery
{
Field = new Field("seq"),
Terms = new List<int> {1 ,2, 3}
};
This works if define using fluent DSL
var search = new List<int> {1, 2, 3};
q.Terms(c => c
.Field(p => p.seq)
.Terms(search)
)
What are I doing wrong with the object initializer syntax? Thanks for any help in advance.