Reputation: 5904
I want to search for a string in Sphinx and get all documents that contains that string
Example: search for "bot" and get the documents that contain "xbot", "robot", "botanic", etc
Basically I want my search to have same effects as running a
SELECT * FROM table WHERE column_name LIKE '%bot%'
How can I do that?
Note: I tried to use min_infix_len but it seems that is only extends the search a little bit but not fully. So if I set conf-min-prefix-len = 2 it will match 'xbot' but not "botanic"
Upvotes: 2
Views: 2881
Reputation: 110
Try using wildcard in Extended Query Syntax and min_infix_len enabled
SELECT * FROM myindex WHERE MATCH("bot | bot* | *bot*")
Upvotes: 3