Still I don't understand why :star => true gives this behaviour:

Sphinx   Querying: '*LOC*-*4*-*BUILDING*-*'

But it's working as expected now :) as long I explicity (and that's
what i wanted) add the "*"

On Dec 14, 12:41 pm, Pat Allan <[email protected]> wrote:
> Hi Pedro
>
> enable_star allows for you to use *'s in queries - but :star => true 
> automatically adds them on word boundaries. You can still use enable_star, 
> but you'll just have to add *'s where you want them, instead of letting 
> Thinking Sphinx guess where you want them.
>
> Hope this clarifies things.
>
> Cheers
>
> --
> Pat
>
> On 14/12/2010, at 10:25 PM, Pedro Cunha wrote:
>
> > Hello Pat,
>
> > It fixed my problem. Still It's a bit confusing. Thought enabling star
> > would let me do searchs with "*", and I'm using extended mode aswell.
>
> > Thanks!
>
> > On Dec 12, 10:26 pm, Pat Allan <[email protected]> wrote:
> >> Hi Pedro
>
> >> It looks like you're using :star => true in your second example. Try 
> >> removing that option and let us know if it works as you expect.
>
> >> Cheers
>
> >> --
> >> Pat
>
> >> On 13/12/2010, at 5:18 AM, Pedro Cunha wrote:
>
> >>> Hello, i'm having some problems searching for records with "-" on
> >>> fields.
> >>> I've read we should use a sphinx.yml and configure the char set
> >>> table.
>
> >>> If I do this search on console:
>
> >>> ModelName.search("LOC-4-BUILDING-*")
>
> >>>  Sphinx   Querying: 'LOC-4-BUILDING-*'
> >>>  Sphinx (0.009602s)   Found 20 results
>
> >>> But if I do the exact same search via a controller:
>
> >>>  Params from the website on console: "search"=>"LOC-4-BUILDING-*"
>
> >>>  Sphinx   Querying: '*LOC*-*4*-*BUILDING*-*'
> >>>  Sphinx (0.004071s)   Found 0 results
>
> >>> I'm aware on the rails app, I got indexed model configured as:
> >>> set_property :enable_star => true
> >>> set_property :min_prefix_len => 3
>
> >>> Is the first property causing the problem on search? Why is TS adding
> >>> a wildcard between "-" ? I've tried added to char_set_table "-" but no
> >>> success.
>
> >>> Best regards, and thanks for the awesome TS
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups 
> >>> "Thinking Sphinx" group.
> >>> To post to this group, send email to [email protected].
> >>> To unsubscribe from this group, send email to 
> >>> [email protected].
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/thinking-sphinx?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Thinking Sphinx" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/thinking-sphinx?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to