Method and an apparatus for fast merging inverted chains
First Claim
1. A method for fast merging inverted chains performed by a hardware processor, comprising:
- pre-setting an inverted index including a plurality of inverted chains and recording a length of each inverted chain;
searching the inverted index and obtaining a subset of the plurality of inverted chains that correspond to at least one keyword;
sorting the subset of the plurality of inverted chains in an ascending order of the lengths of the subset of multiple inverted chains; and
sequentially merging the subset of the plurality of inverted chains as the ascending order, wherein the merging includes;
merging one of the subset of the plurality of inverted chains that has a shortest length with one of the subset of the plurality of inverted chains that has a second shortest length to generate an inverted chain including the one of the subset of the plurality of inverted chains that has the shortest length and the one of the subset of the plurality of inverted chains that has the second shortest length, andmerging the inverted chain with one of the subset of the plurality of inverted chains that has a third shortest length.
2 Assignments
0 Petitions
Accused Products
Abstract
In accordance with various embodiments of the disclosed subject matter, a method for fast merging inverted chains, and a related apparatus are provided. In some embodiments, the method comprises: pre-setting an inverted index including a plurality of inverted chains and recording a length of each inverted chain; searching the inverted index and obtaining a subset of the plurality of inverted chains that correspond to at least one keyword; sorting the subset of the plurality of inverted chains in an ascending order of the lengths of the subset of multiple inverted chains; and merging the subset of the plurality of inverted chains sequentially as the ascending order starting from one of the subset of the plurality of inverted chains that has the shortest length.
11 Citations
20 Claims
-
1. A method for fast merging inverted chains performed by a hardware processor, comprising:
-
pre-setting an inverted index including a plurality of inverted chains and recording a length of each inverted chain; searching the inverted index and obtaining a subset of the plurality of inverted chains that correspond to at least one keyword; sorting the subset of the plurality of inverted chains in an ascending order of the lengths of the subset of multiple inverted chains; and sequentially merging the subset of the plurality of inverted chains as the ascending order, wherein the merging includes; merging one of the subset of the plurality of inverted chains that has a shortest length with one of the subset of the plurality of inverted chains that has a second shortest length to generate an inverted chain including the one of the subset of the plurality of inverted chains that has the shortest length and the one of the subset of the plurality of inverted chains that has the second shortest length, and merging the inverted chain with one of the subset of the plurality of inverted chains that has a third shortest length. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. An apparatus for fast merging inverted chains, comprising:
a hardware processor, wherein the hardware processor is configured to; pre-set an inverted index including a plurality of inverted chains and record a length of each inverted chain; search the inverted index and obtaining a subset of the plurality of inverted chains that correspond to at least one keyword; sort the subset of the plurality of inverted chains by an ascending order of the lengths of the subset of multiple inverted chains; and sequentially merge the subset of the plurality of inverted chains as the ascending order, wherein the hardware processor is further configured to; merge one of the subset of the plurality of inverted chains that has a shortest length with one of the subset of the plurality of inverted chains that has a second shortest length to generate an inverted chain including the one of the subset of the plurality of inverted chains that has the shortest length and the one of the subset of the plurality of inverted chains that has the second shortest length, and merge the generated inverted chain with one of the subset of the plurality of inverted chains that has a third shortest length. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
Specification