indexer: Use functional approach to result
Also add one missing use case test (one with already indexed data)