Have an ElasticSearch index where the potential hits are build like this:
id: number,
source: string,
type: string,
organization: {
main: [string],
support: [string]
},
title: {
main: [string],
sub: [string]
}
My problem is that I can't search the elements in [].
No problem doing this:
var searchResults = client.Search<Document>(s => s
.Index(****)
.Type(****)
.MatchAll()
.Query(q =>
q.Term(p => p.source, "some source name")
))
But this one doesn't work:
var searchResults = client.Search<Document>(s => s
.Index(****)
.Type(****)
.MatchAll()
.Query(q =>
q.Term(p => p.organization.main[0], "some organization name")
))
I have also tried this version, but it also doesn't work:
var searchResults = client.Search<Document>(s => s
.Index(****)
.Type(****)
.MatchAll()
.Query(q =>
q.Term(p => p.organization.main, "some organization name")
))
Can anyone spot what is going wrong?