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.
Asked
Active
Viewed 259 times
1 Answers
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