LPS-50073 Revert previous implementation and use the first approach that works. Currently search is broken because it returns all possible documents and breaks some tests.