Hi,
is it possible to return different source fields for different document types?
or query different fields for different types?
I would like to do something like this but in one request:
curl -XGET 'http://localhost:9200/my-index/MYTYPE1/_search?pretty' -d '{
"_source": [ "MYTYPE1.field1" ],
"min_score": 1,
"query": {
"bool" : {
"must" : {
"query_string" : {
"fields" : ["MYTYPE1.field1"],
"query" : "queryString~*"
}
}
}
}
}
'
curl -XGET 'http://localhost:9200/my-index/MYTYPE2/_search?pretty' -d '{
"_source": [ "MYTYPE2.field1", "MYTYPE2.field2" ],
"min_score": 1,
"query": {
"bool" : {
"must" : {
"query_string" : {
"fields" : ["MYTYPE2.field2"],
"query" : "queryString~*"
}
}
}
}
}
'
Regards, Wojtas