如果查询中包含停用词,则不会返回 Amazon Cloudsearch 结果

Fec*_*ore 5 amazon-web-services amazon-cloudsearch

使用字段的确切内容作为查询查询 Amazon Cloudsearch 时,如果查询(和内容)包含停用词,Cloudsearch 不会返回任何结果。如果我从查询中删除停用词,则返回结果。

我知道在索引性能时会从内容中删除停用词,但我认为它们也会在查询中被忽略以防止这种行为。

为了让冗长的用户获得预期的结果,我是否需要从每种语言的查询中过滤掉停用词,或者 Cloudsearch 是否有办法忽略查询本身中的停用词?

索引字段内容:

The Company Search Test
Run Code Online (Sandbox Code Playgroud)

示例查询

使用停用词:

Query: the company search test
Results: NONE
Run Code Online (Sandbox Code Playgroud)

没有停用词:

Query: company search test
Results: YES
Run Code Online (Sandbox Code Playgroud)

内引:

Query: "the company search test"
Results: YES
Run Code Online (Sandbox Code Playgroud)

此示例的实现细节:

  • 索引字段类型:“文本”
  • 索引字段分析方案:“英文”
  • 为字段选择的所有选项:“返回”、“排序”、“突出显示”
  • QueryParser:“简单”
  • 在 AWS 仪表板中使用测试搜索(如果使用 Go sdk,结果相同)