Hi Pat,

Thanks for your prompt reply.
I already thought about this one, the only drawback is that when we
add a field to the index, we should also change the search to add the
field to the list
every,field,except,that,one,but,including,the,new,ones.

I was looking for something like:

Article.search_for_ids(keywords, :with => {:article_id =>
article.id}, :match_mode => :extended), without =>
"fields,I,want,to,exclude,explicitly"


On Sep 21, 12:09 pm, Pat Allan <p...@freelancing-gods.com> wrote:
> Hi Marcel
>
> Just to confirm - you want articles that match the keywords, whether or not a 
> specific field matches? This should do the job:
>
>   Article.search_for_ids("@(every,field,except,that,one) #{keywords}", :with 
> => {:article_id => article.id}, :match_mode => :extended)
>
> If I've misunderstood, let me know.
>
> Cheers
>
> --
> Pat
>
> On 21/09/2010, at 7:29 PM, Marcel Overdijk wrote:
>
>
>
> > Would it be possible to exclude a field from a search?
>
> > We like to search like:
>
> > Article.search_for_ids(keywords, :with => {:article_id =>
> > article.id}, :match_mode => :extended)
>
> > But the search results should not include article where a certain
> > field matches with the keywords.
>
> > I notices the :without option but as I understand it is to exclude a
> > match on a value, I just want to search without a field whatever the
> > value would be.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Thinking Sphinx" group.
> > To post to this group, send email to thinking-sph...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > thinking-sphinx+unsubscr...@googlegroups.com.
> > 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 thinking-sph...@googlegroups.com.
To unsubscribe from this group, send email to 
thinking-sphinx+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to