简体   繁体   中英

amazon cloudsearch structured query prefix not returning the same results as simple query

I'm searching for the prefix q=red bul* using the simple query parser and I get results however when I change it to use structured query and do (prefix 'red bul') I get no results.

Am I missing something and can anyone else replicate this issue?

I believe you need to specify the field when using the prefix operator, eg

(prefix field=foo 'red bul') .

See http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html#searching-text-prefixes

我相信你需要做

(prefix 'bul') 'red'

I seem to have better results, when using the structured parser, if I include the final word as either a whole word or as a prefix. For example:

Query: "(and title_en:'red' (or title_en:'bul' (prefix field='title_en' 'bul')))"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM