On 25/11/2009, at 9:04 AM, Phantom wrote:
> Here it goes.
>
> index:
>
> ...
> indexes name
> indexes note.description, :as => :note_description
>
> has note.created_at, :as => :note_created_at
> has note.author_id, :as => :note_author_id
> ...
>
> 1)
> Is there no other way to exclude an indexed field from search, besides
> switching to :extended2 mode, and prepending a "@(fields,to,search)"
> to the search string?
Unfortunately, the @(all,fields,but,one) option is the only way I know
of to exclude a specific field from your searching.
> btw this method does not work with the ":star => true", because that
> prepended "@(fields,to,search)" also gets affected. But that is not a
> problem, and in no way a feature request ;)
>
> 2)
> When doing a search like:
>
> Model.search "blah blah", :with => { :note_author_id =>
> [10], :note_created_at => some_range }
>
> I get records with :note_author_id = 10 OR :note_created_at within
> certain range. Is there no way to force AND logic between filter
> hashes? I somehow thought that AND logic was the default behaviour.
It should definitely be using AND - there's no way for multiple
filters to be done with OR logic. Can you provide some examples of the
data you're using in the filters?
Cheers
--
Pat
--
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.