cqengine icon indicating copy to clipboard operation
cqengine copied to clipboard

LongestPrefixMatch in case of Index Ordering strategy - Draft version(Proposal)

Open fouadazem opened this issue 3 years ago • 0 comments

the Use Of Inverted Radix Tree adopted into CqEngine once there are Longest Prefix match attributes provided. what was done on this Solution is to cover the following

  1. get the Inverted Radix Holder that has the ability to hold inverted radix trees for specific key ( Setter and getter added)
  2. the ability from the cqengine to receive the Longest prefix and attributes part of the query options
  3. Logic in case of Longest Prefix match attributes provided and index ordering strategy called , get the Appropriate inverted Radix Tree and on it , get all the prefixes loaded prehand in our case its happening during the start up and then add to the currrent query instead of Longest Prefix match Operator , add the In Operator with prefixes got from the Inverted Radix Tree finally we are invoking the retrieveWithIndexOrderingStrategy and then got the result of the longest prefix columns arraged in descending order. final stage is to filter the result and find if we have 1 record of longest or the length of the first longest reduced .

we test the soluation from performance wise and we found huge improvement from what currently exist . this is only proposal soluation . please review and let me knows how i can improve it to make it better from all the perspectives.

fouadazem avatar Nov 29 '22 18:11 fouadazem