I inserted records with below commands:
POST dnmindex1/doc/
{
"matches": [
{
"XURI": "xcp:4.1:a:abcv12:abcp12:6.0:*:*:*:*:*:*:*"
},
{
"XURI": "xcp:4.1:a:abcv1:abcp1:6.0:beta1:*:*:*:*:*:*",
},
{
"XURI": "xcp:4.1:a:abcv:abcp:6.0:beta2:*:*:*:*:*:*",
}
]
}
POST dnmindex1/doc/
{
"matches": [
{
"XURI": "xcp:4.1:a:abcv-abc12:abcp-abc12:6.0:*:*:*:*:*:*:*"
},
{
"XURI": "xcp:4.1:a:abcv-abc1:abcp-abc1:6.0:beta1:*:*:*:*:*:*",
},
{
"XURI": "xcp:4.1:a:abcv-abc:abcp-abc:6.0:beta2:*:*:*:*:*:*",
}
]
}
POST dnmindex1/doc/
{
"matches": [
{
"XURI": "xcp:4.1:a:bgbgbv:bgbgbp:6.0:*:*:*:*:*:*:*"
},
{
"XURI": "xcp:4.1:a:bgbgbv-abc1:bgbgbp-abc1:6.0:beta1:*:*:*:*:*:*",
},
{
"XURI": "xcp:4.1:a:bgbgbv-abc:bgbgbp-abc:6.0:beta2:*:*:*:*:*:*",
}
]
}
Now I want to get record which has :abcv-abc12:abcp-abc12:
I used below query but got error.
GET dnmindex1/_search
{
"query": {
"bool": {
"must": [
{
"query_string": {
"default_field": "matches.XURI",
"query": ":abcv-abc12:abcp-abc12:"
}
}
]
}
}
}
What is wrong with my search query? What query should I use to get the record I want?