Sorting method
First Claim
1. A method of sorting information records in accordance with the contents of one or more specified sort fields for each record, in which any of the specified sort fields may contain any number of sort objects and in which sort objects may vary in length, the method comprising the steps ofA. assigning for each successive specified sort field a next one of a set of lexicographically ordered field keys,B. generating a sort key for each record byB1. initializing the sort key to a prescribed initial state,B2. for a first sort field in the record containing at least one sort object, appending to the present sort key the assigned field key,B3. appending to the present sort key a character string derived from a first sort object of the field, the resulting appendage from steps B2 and B3 having the characteristic that it is not a valid prefix of a character string derived from any other sort object in the corresponding sort field of another of the records,B4. repeating steps B2 and B3 for each sort object of the first sort field, repeating steps B2, B3 and B4 for each successive specified sort field,B5. appending to the present sort key a different terminating field key selected from the set of lexicographically ordered field keys, andC. ordering the records according to a lexicographic comparison of their sort keys.
2 Assignments
0 Petitions
Accused Products
Abstract
A sorting method for ordering information records according to the contents of one or more sort fields of the records. A sort key is the form of a character string is generated for each record according to a disclosed algorithm and the ordering of the records is performed according to a simple character-by-character sorting of the sort keys. Each of the sort fields may be of variable length and any sort field of any record may contain any number, including zero, of individual sort strings, referred to herein as sort objects.
-
Citations
10 Claims
-
1. A method of sorting information records in accordance with the contents of one or more specified sort fields for each record, in which any of the specified sort fields may contain any number of sort objects and in which sort objects may vary in length, the method comprising the steps of
A. assigning for each successive specified sort field a next one of a set of lexicographically ordered field keys, B. generating a sort key for each record by B1. initializing the sort key to a prescribed initial state, B2. for a first sort field in the record containing at least one sort object, appending to the present sort key the assigned field key, B3. appending to the present sort key a character string derived from a first sort object of the field, the resulting appendage from steps B2 and B3 having the characteristic that it is not a valid prefix of a character string derived from any other sort object in the corresponding sort field of another of the records, B4. repeating steps B2 and B3 for each sort object of the first sort field, repeating steps B2, B3 and B4 for each successive specified sort field, B5. appending to the present sort key a different terminating field key selected from the set of lexicographically ordered field keys, and C. ordering the records according to a lexicographic comparison of their sort keys.
Specification