我的 JSON 文档是这样的: Meu documento JSON é assim:
{
"query" : {
"bool": {
"minimum_should_match": 1,
"should": [
{
"bool": { "must": [{"match": {"txt": "p"}},
{"match": {"nm": "p"}}
]
}
},
{
"bool": { "must": [{"match": {"txt": "p"}}
]
}
},
{
"bool": { "must": [{"match": {"nm": "p"}}
]
}
}
]
}
},
"highlight": {
"number_of_fragments" : 1,
"order": "score",
"boundary_scanner": "sentence",
"fragment_size" : 300,
"pre_tags" : ["<tag1>"],
"post_tags" : ["</tag1>"],
"fragmenter": "span",
"fields" : {
"nm": {},
"txt": {}
}
},
"_source": false
}
如何使用@Query注解编写查询方法? (或者是否有其他方法可以突出显示)? 您可以使用 @Query 来咨询方法吗? (ou se houver algum outro método que eu consiga colocar o 亮点)?
观察:强调非常重要 观察:重要的事情
感谢您的任何建议。 Obrigado por qualquer sugestão.