In this paper we tackle the problem of document image retrieval by combining a similarity measure between documents and the probability that a given document belongs to a certain class. The membership probability to a specific class is computed using Support Vector Machines in conjunction with similarity measure based kernel applied to structural document representations. In the presented experiments, we use different document representations, both visual and structural, and we apply them to a database of historical documents. We show how our method based on similarity kernels outperforms the usual distance-based retrieval. Categories and Subject Descriptors I.7.5 [Document and Text Processing]: Document Capture—Document analysis; H.3.7 [Information Storage and Retrieval]: Digital Libraries General Terms Algorithms Keywords Document retrieval, Support Vector Machines, Similarity measure based kernels, query-by-example