0

I have a (Rails) Object with subclasses, but when I use Thinking Sphinx I only want to search that parent object, and exclude searching the subclasses. I'm using the typical STI setup for Rails, with the :type column defined on the parent Object.

beeudoublez
  • 1,222
  • 1
  • 12
  • 27

1 Answers1

0

Figured it out. When you define your index on the parent Object, set the following:

define index do

where "parentObjects.type is null"

end

parentObjects is the name of the table for the parent object.

beeudoublez
  • 1,222
  • 1
  • 12
  • 27