Allow search for nothing but document IDs

[finishes #78120952]