karthikselva
karthikselva

Reputation: 123

Thinking Sphinx wild card search and fuzzy operator not found

I am trying to implement a full text for set of models. I heard the power of sphinx in its indexing speed and search time. But wild card searches and nearest word match ( Levenshtein distance) are not working in this.

    Post.search 'kar' 
returns no results while 
    Post.search 'karthik' 
returns 10 results matching the exact string. I even tried with star parameter
    Post.search 'kar' , :star => true
 which returns zero results.

I tried with all combinations like 'kar*' , 'krathik~' , etc in lucene flavored full text search engines and it works fine. Am I missing any optional parameters or does sphinx still lacks this feature?

Upvotes: 1

Views: 433

Answers (1)

badams
badams

Reputation: 252

Have you added something like the following to your config/sphinx.yml file?

development:
min_infix_len: 2
sql_host: localhost
sql_user: root

Upvotes: 1

Related Questions