Kaa*_*rde 11 amazon-web-services amazon-cloudsearch
如何phrase以及term在不同的Structured查询?
我的CloudSearch域中有这些数据:
{
"guid": 9,
"operating_systems": [
"12345", "123"
],
"manufacturer": "sealand",
"model": "gaming tree whale plum",
"identifier": "gaming tree whale plum",
"type": "computer",
"created_at": "1982-10-14T14:43:54Z"
}
Run Code Online (Sandbox Code Playgroud)
"model"是类型text,"identifier"是类型literal,"created_at"是类型date.
我们来一些问题:
(phrase field=model 'tree whale') match
(phrase field= identifier 'tree whale') no match
(phrase 'tree whale') match
(phrase field=created_at '1982-10-14T14:43:54Z') match (this shouldn't match according to docs)
(term field=model 'tree whale') match
(term field= identifier 'tree whale') no match
(term 'tree whale') match
(term field=created_at '1982-10-14T14:43:54Z') match
Run Code Online (Sandbox Code Playgroud)
有什么我可以做的phrase,我不能做,term反之亦然?
termVS的语法和用法差别很小phrase。然而,处理中的搜索行为phrases可以通过不能的方式进行定制terms,这可以用来提高性能:
Terms用于匹配文本字段,其中phrases用于更复杂的搜索。
跳过 Web 文档,只需阅读所有 PDF: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/cloudsearch-dg.pdf
| 归档时间: |
|
| 查看次数: |
760 次 |
| 最近记录: |