use of enable_star

1806 views
Skip to first unread message

serge

unread,
May 23, 2008, 4:56:47 AM5/23/08
to Thinking Sphinx
Hi, we've just started using Thinking Sphinx (and Sphinx at the same
time) and we're impressed. Of course, we try to do more things: in
order to implement a keyword search we'd like to use wildcard search.
It seems the way of doing this is to use enable_star and
min_prefix_len in the sphinx.conf. But so far it doesn't have any
impact on my search: Product.search("Fra*") doesn't return anything
while Product.search("France") returns a few products.
I wondered if anyone had tried to use these settings with Thinking
Sphinx.
A subsidiary question: actually I'm trying to make a keyword search,
there may be a better way than using a wildcard search and seeing how
many hits we have (and trying to find what are the keyword hits, not
sure how to do that yet)..

James Healy

unread,
May 23, 2008, 7:08:21 AM5/23/08
to thinkin...@googlegroups.com
serge wrote:
> Hi, we've just started using Thinking Sphinx (and Sphinx at the same
> time) and we're impressed. Of course, we try to do more things: in
> order to implement a keyword search we'd like to use wildcard search.
> It seems the way of doing this is to use enable_star and
> min_prefix_len in the sphinx.conf. But so far it doesn't have any
> impact on my search: Product.search("Fra*") doesn't return anything
> while Product.search("France") returns a few products.
> I wondered if anyone had tried to use these settings with Thinking
> Sphinx.

I use both enable_star and min_prefix_len on my site, and it works as
you are expecting.

What are you setting them to? Can you confirm the settings in your
sphinx.yml file are being correctly written to config/ development.sphinx.conf?

In sphinx.yml I have:

development:
allow_star: true

Which results in development.sphinx.conf having the following 2 lines
added to each index

enable_star = 1
min_prefix_len = 1

The documentation for ThinkingSphinx::Configuration lists all the valid
options.

-- James Healy <jimmy-at-deefa-dot-com> Fri, 23 May 2008 21:01:09 +1000

serge

unread,
May 29, 2008, 7:47:58 AM5/29/08
to Thinking Sphinx
Thank you James. I didn't now about this option. It works.
Reply all
Reply to author
Forward
0 new messages