The plan is to use Thinking Sphinx to search for @Replies and @Mentions 
within a messages.content column, but at present Sphinx is also returning 
"UserName" matches alongside "@UserName":

@Replies (Only return Messages where messages.content begins with 
"@UserName"):
Message.search("^\\@#{user_name}")

@Mentions (Only return Messages where messages.content contains "@UserName" 
but does not being with "@UserName"):
Message.search("\\@#{user_name}", conditions: { content: 
"!^\\@#{user_name}" })

Does anyone know how to filter out the "UserName" matches and to only 
return "@UserName" in both cases?

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/thinking-sphinx/-/crUUOWFC_soJ.
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