Display similar records based on attribute matching percentage

4
Hi, I need to find similar records based on string attribute in an object. Eg;  Str1: This is a wonderful place Str2: This is a beautiful place Str1 matches str2 by 80% and vice versa Similarly, I need to find the maximum similar records by percentage and show it on a page. I have used java action(Jaro and Jaro-Winkler similarity algorithm) to display similar records. If a new string(object) is created I have to update all the records with the percentage and I should display the record with the maximum percentage Issue: If I have 1000 objects, when a new object is created I have to loop through all the 1000 objects to update all the percentage which makes a performance issue on the page. Is there is any workaround for this? Thanks in advance
asked
1 answers
0

Why don’t you keep track of the object with the highest match in your java action and return this data, in a result object with an association to the matching object and an attribute for the percentage and link this to the record you are matching or something along these lines. This to prevent you having to update all records every time a new record is created.

answered