Probabilistic Indexing for Handwritten Text Retrieval