Fix search queries so that only active items are indexed