Hi All,
In CQ5 6.1 , trying to use fuzzy search of course that gives better result but query execution time is way higher than keyword search Here is example.
With fuzzy search keyword “mp0f”
04.08.2015 12:44:55.383 *INFO* [0:0:0:0:0:0:0:1 [1438706694906] GET /content/abc/search-results.html HTTP/1.1] apps.abc.components.searchResults.searchResults$jsp getAllResult(): Query = /jcr:root/content/ abc //element(*, cq:Page)[(jcr:contains(., 'mp05') or jcr:contains(., 'mp05~0.6^180') or jcr:contains(jcr:content/@jcr:title, '"mp05"^180') or jcr:contains(jcr:content/keywords-list/text, '"mp05"^100') or jcr:contains(., '"mp05"^60') or fn:lower-case(jcr:content/@jcr:title) = '"mp05"^200') and ((jcr:content/@offTime > xs:dateTime('2015-08-04T16:44:00.000Z')) or not(jcr:content/@offTime))] order by @jcr:score descending , execution time: 382 ms, total results: 5
With no fuzzy search keyword “mpof”
04.08.2015 12:44:55.383 *INFO* [0:0:0:0:0:0:0:1 [1438706694906] GET /content/abc/search-results.html HTTP/1.1] apps.abc.components.searchResults.searchResults$jsp getAllResult(): Query = /jcr:root/content/ abc //element(*, cq:Page)[(jcr:contains(.,mpo5) or jcr:contains(., 'mpo5^180') or jcr:contains(jcr:content/@jcr:title, '"mpo5"^180') or jcr:contains(jcr:content/keywords-list/text, '"'mpo5"^100') or jcr:contains(., '"'mpo5"^60') or fn:lower-case(jcr:content/@jcr:title) = '"mp05"^200') and ((jcr:content/@offTime > xs:dateTime('2015-08-04T16:44:00.000Z')) or not(jcr:content/@offTime))] order by @jcr:score descending , execution time: 52 ms, total results: 5
Is there other thought to implement “context/similarity search” and keep query execution time lower.. 382 ms is way higher…under 100 ms is still acceptable. Thought?
Referred URL
http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
http://lucene.apache.org/core/3_3_0/api/core/org/apache/lucene/search/Similarity.html
http://www.lucenetutorial.com/advanced-topics/scoring.html
https://forums.adobe.com/thread/1158034
Thanks,
Chandra