 |
Burrows, Michael; |
Object-oriented interface for an index

A method for searching a plurality of index entries in an index of a database including parsing a query into one or more terms with an operator, generating a basic stream reader object to sequentially read the location of the index to determine a target location for the term, and generating a compound stream reader object to reference the plurality of basic stream reader objects associated with the term related by the operator to produce locations of words within a single record.


I claim:
1. A computer implemented method of searching an index to locate a record in a database, comprising the steps of:
receiving a plurality of terms related by an operator;
generating a plurality of first reader objects correlating to the terms;
processing the first reader objects to search the index to locate records containing one or more of the terms;
generating a second reader object correlating to the operator; and
processing the second reader object to locate the record included in the located records, wherein the record containing the terms related to the operator;
wherein at least one of the plurality of first reader objects includes one of an object pointer, a word associated with one of the terms, a current location, a previous location, and an estimate overshoot.
2. The method of claim 1, wherein the at least one of the first reader object includes one of a get word, a get location, and a get next location, a get location limit, a close, and a get previous location.
3. The method of claim 2, further comprising a step of:
producing a current word when the get word method of a reader object is called;
producing a current location when the get location method of a reader object is called;
producing a next location when the get next location method of a reader object is called;
producing a next location which is at least a target location but not greater than a limit location when the get location limit method of a reader object is called;
producing a previous location when the get previous method of a reader object is called; and
closing the reader object when the close method of a reader object is called.
4. The method of claim 1, wherein the second reader object includes one of an object pointer, a word associated with the first reader object, a current location, a previous location and an estimate overshoot.
5. The method of claim 1 wherein the second reader object includes one of a get word, a get location, a get next location, a get location limit, a close and a get previous location.
6. The method of claim 1, wherein the index further including a collating order of words.
7. The method of claim 6, wherein the collating of words each including a collating order of locations.
8. A computer implemented method of searching an index to locate a record in a database, comprising the steps of:
receiving a term;
generating a first reader object correlating to the term; and
processing the first reader object to search the index to locate the record containing the term;
wherein the first reader object includes a data reference, the data reference including one of an object pointer, a word associated with the term, a current location, a previous location and an estimate overshoot.
9. The method of claim 8, wherein the first reader object includes a method reference and wherein the method reference of the first reader object includes one of a get word, a get location, a get next location, a get location limit, a close, and a get previous location.
10. The method of claim 9, further comprising a step of:
producing a current word when the get word method of a reader object is called;
producing a current location when the get location method of a reader object is called;
producing a next location when the get next location method of a reader object is called;
producing a next location which is at least a target location but not greater than a limit location when the get location limit method of a reader object is called;
producing a previous location when the get previous method of a reader object is called; and
closing the reader object when the close method of a reader object is called.
11. The method of claim 8, wherein the index further including a collating order of words.
12. The method of claim 8, wherein the collating order of words each including a collating order of locations.
13. A system for searching an index to locate a record in a database, comprising:
a memory configured to store the index; and
a processor configured to process a plurality of first reader objects correlating to a plurality of terms related by an operator to search the index to locate records containing one or more of the terms, and a second reader object correlating to the operator to search the index to locate the record included in the located records, wherein the record contains the terms related by the operator;
wherein the first reader object includes a data reference and a method reference and wherein the data reference of the first reader object includes one of an object pointer, a word associated with the term, a current location, a previous location and an estimate overshoot.
14. The device of claim 13, wherein the method reference of the first reader object includes one of a get word, a get location, a get next location, a get location limit, a close, and get previous location.
15. A system for searching an index to locate a record in a database, comprising:
a memory configured to store the index; and
a processor configured to process a first reader object correlating to a term to search the index to locate the record containing the term;
wherein the first reader object includes a data reference including one of an object pointer, a word associated with the term, a current location, a previous location and an estimate overshoot.
16. The device of claim 15, wherein the first reader object includes a method reference and wherein the method reference of the first reader object includes one of a get word, a get location, a get next location, a get location limit, a close, and a get previous location.
|