If you really do need to use Sphinx for this, perhaps phrase search (quotes, http://sphinxsearch.com/docs/current.html#extended-syntax) is what you want.
It's hard to know what you're looking for without more details. Do you want to avoid post bodies being exactly identical? If so, validates_uniqueness_of or something similar that doesn't use Sphinx makes more sense. If you want some more refined similarity measure, let us know what the requirements are exactly. On Tue, Dec 9, 2008 at 9:36 AM, Henrik Nyh <[EMAIL PROTECTED]> wrote: > class Post < ActiveRecord::Base > validates_uniqueness_of :body > end > > ? > > On Tue, Dec 9, 2008 at 7:10 AM, agib <[EMAIL PROTECTED]> wrote: >> >> On my site I want to prevent people from posting the same thing >> twice... so I want to run a search once the user is done with the post >> to prompt them to make sure their post is unique. Using the entire >> post as a search query doesn't work... should I break it up word by >> word? I'm using sphinx with thinking-sphinx... has anyone encountered >> this before? >> >> I was thinking of searching all the words individually and picking >> merging the smallest search result sets... >> >> Thanks, >> Aaron >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
