开发者

Sphinx query for "starts-with" condition

I am trying a query to search a table in w开发者_JAVA百科hich names start with a letter g.

"hospital @name ^g"

Is this right ? I am getting 0 results for it even after indexing the table with names and all other columns.


Do you have min_prefix_len set to 1 for that index? Without this Sphinx treats "g" as a separate word and will match only those documents that start with one-letter word "g", for example "g anotherword".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜