Open derek-watson opened 11 years ago
That seems reasonable enough to me. One caveat is that it won't be handled by the dmetaphone or trigram search features in an expected manner, but I'm not sure how to reconcile that.
@derek-watson since normal practice with google searches for excluding search terms is to put a dash/hyphen before terms 'jaguar -cat'
, would I need to check if the user done that and replace them in the search terms string with !
to do this negation or would it be better if the gem allowed for negation by that format -term
as well?
If application users doing the search are more familiar with oracle's text search query format I think an exclamation before the word actually triggers the oracle search to use soundex which is like dmetaphone.
Hello,
Unless I'm missing something, it seems difficult/impossible to build a search scope that matches some terms and excludes others. I'm considering extending this gem so allow the following case:
Which would match documents with 'jaguar' in the title and exclude those with 'cat', leveraging the basic feature of
tsquery
documented here: http://www.postgresql.org/docs/9.2/static/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIESWould a pull request implementing this feature be accepted?