I have a use case for comparing two given strings (attached to a specific field) using Lucene and get the similarity scores.
I tried but could not find any built-in way to do so. Hence assuming that Lucene only compares a Query against Indexed documents, I came up with the following approach: (Let the 2 strings be, str1 and str2 ) 1) Create an IndexWriter using a RAMDirectory (I don't want to store those strings on the disk) 2) Index str1 and store it 3) Search str2 in the index. ( shall the indexWriter be closed before you search on the index? ) 4) Get the similarity score & publish it 5) Delete str1 from the index and make the index available for a new comparison Any comments & suggestions on making the process optimal Siddharth -- View this message in context: http://www.nabble.com/Arbitrary-String-to-String-Similarity-Score-tp18020806p18020806.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]