简体   繁体   中英

Only exact with wildcard matching and proximity using Sphinx Search Engine (API-PHP)

I have this huge problem properly configuring Sphinx, I have an index of name, tags and cat_tags. I would like return extended matches, eg

if I type "eng" I should receive all records matching " eng ", so: engine, english, boateng (for any indexed field) would be inlucded within the query result. How should I configure my index and my PHP-API in order to get desired result? Also how should the exact query look, taking $phrase being a phrase we are looking for (one or more words, we need all perfect matches along with possible matches - just like search hinting would give us).

By default sphinx indexes whole words - as per charset_table .

To match part words look at min_infix_len http://sphinxsearch.com/docs/current.html#conf-min-infix-len

enable it along with expand keywords http://sphinxsearch.com/docs/current.html#conf-expand-keywords

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