# US 2002/0059281 A1 · Method for creating an index and method for searching an index

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2002/0059281 A1
- Document ID: US20020059281A1
- Status: Published application
- Kind: A1
- Application number: 09/972,865
- Filed: 2001-10-10
- Published: 2002-05-16
- Earliest claimed: 1998-01-23
- Assignees: Fuji Xerox Co., Ltd.
- Inventors: Yoshiki Watanabe; Hiroshi Hayata
- Web page: https://patentgrep.com/patent/US20020059281A1

## CPC

- G06F 16/322: {Trees}
- Y10S 707/99933: Query processing, i.e. searching
- Y10S 707/99934: Query formulation, input preparation, or translation
- Y10S 707/99935: Query augmenting and refining, e.g. inexact access
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

A B+ tree index for a full-text search through documents is created fast and fast searches are implemented using the index. A B+ tree index to register sets of words serving as keys and documents containing the words is constituted of a plurality of B+ tree subindexes; a document identification number id and a word identification number iw are assigned to a document and a word to uniquely identify them; as a function to apply to documents, a hash function Hd is provided that maps a document identification number to a value indicating the position of horizontal direction of a two-dimensional array, and as a function to apply to words, a hash function Hw is provided that maps a word identification number to a value indicating the position of vertical direction of the two-dimensional array; and the occurrence of a word in a document is registered in a corresponding subindex B+ tree (Hd(id), Hw(iw)) by using values obtained by applying the hash functions to the document identification number and the word identification number, respectively. The index is searched using a value with a word identification number as a key and a document identification number concatenated.

## Claims

### Claim 1

A method for creating an index in which keys and values are associated to search for a value from a specified key, comprising the steps of:
constituting the index to register sets of keys and values by a plurality of subindexes; and
storing each of the subindexes in a two-dimensional array position referenced by a value determined by applying a predetermined function to a value to be registered and a value determined by applying a predetermined function to a key.

### Claim 2 (depends on 1)

A method for creating an index according to claim 1, wherein B+ tree structure is used as the subindexes.

### Claim 3 (depends on 1, 2)

A method for creating an index according to claim 1 or 2, wherein a word is used as a key and one document containing the word is used as a value.

### Claim 4 (depends on 3)

A method for creating an index according to claim 3,
wherein a document identification number and a word identification number are assigned to a document and a word, respectively, to uniquely identify them;
wherein, as a function to apply to documents, a hash function is provided that maps a document identification number to a value indicating the position of one direction of a two-dimensional array, and as a function to apply to words, a hash function is provided that maps a word identification number to a value indicating the position of another direction of the two-dimensional array; and
wherein the occurrence of a word in a document is registered in a corresponding subindex by using values obtained by applying the hash functions to the document identification number and the word identification number, respectively.

### Claim 5 (depends on 4)

A method for creating an index according to claim 4, wherein, when the occurrences of words in a plurality of documents are registered as a single unit, groups are formed by the values obtained by applying a hash function to the document identification numbers of the documents so that the occurrences of words are registered on a group basis.

### Claim 6 (depends on 3)

A method for creating an index according to claim 3,
wherein a word identification number is assigned to a word to uniquely identify it;
wherein, as a function to apply to the occurrence of a word, a hash function is provided that maps the occurrence count of the word in a document to a value indicating the position of one direction of a two-dimensional array;
wherein, as a function to apply to a word, a hash function is provided that maps a word identification number to a value indicating the position of another direction of the two-dimensional array; and
wherein the occurrence of a word in a document is stored in a corresponding subindex by using values obtained by applying the hash functions to the occurrence count of the word and the word identification number, respectively.

### Claim 7 (depends on 6)

A method for creating an index according to claim 6, wherein, when the occurrences of words in a plurality of documents are registered as a single unit, groups are formed by the values obtained by applying a hash function to the occurrence count of the words so that the occurrences of words are registered on a group basis.

### Claim 8 (depends on 3)

A method for creating an index according to claim 3,
wherein a word identification number is assigned to a word to uniquely identify it;
wherein, as a function to apply to the occurrence of a word, a hash function is provided that maps the occurrence frequency of the word in a document to a value indicating the position of one direction of a two-dimensional array;
wherein, as a function to apply to a word, a hash function is provided that maps a word identification number to a value indicating the position of another direction of the two-dimensional array; and
wherein the occurrence of a word in a document is stored in a corresponding subindex by using values obtained by applying the hash functions to the occurrence frequency of the word and the word identification number, respectively.

### Claim 9 (depends on 8)

A method for creating an index according to claim 8, wherein, when the occurrences of words in a plurality of documents are registered as a single unit, groups are formed by the values obtained by applying a hash function to the occurrence frequency of the words so that the occurrences of words are registered on a group basis.

### Claim 10 (depends on 5, 7)

A method for creating an index according to claim 5, 7, or 9, wherein, when the occurrences of all words in documents collected into one group are registered, the occurrences of words are grouped by the values obtained by applying a hash function to the words so that they are registered on a group basis.

### Claim 11 (depends on 10)

A method for creating an index according to claim 10, wherein a page cache capable of storing at least one subindex provided in the main storage is used.

### Claim 12

A method for searching an index which obtains a corresponding document name from a word serving as a key by using an index with document names associated with words contained in the documents,
wherein document identification numbers and word identification numbers are assigned to document names and words, respectively, to uniquely identify them, and
wherein a value with a document identification number concatenated with a word identification number is used as the key.

### Claim 13

A method for searching an index which constitutes an index with document names associated with words contained in the documents by a plurality of subindexes, assigns document identification numbers and word identification numbers to document names and words, respectively, to uniquely identify them, and obtains a corresponding document name from a word serving as a key by using an index registered in a subindex in a two-dimensional array position referenced by a value determined by applying a hash function to a document identification number and a word identification number,
wherein a search by a plurality of words is performed in such a way that groups are formed by the values obtained by applying a hash function to the identification numbers of the words and the subindexes are searched on a group basis.

### Claim 14

A method for searching an index which constitutes an index with document names associated with words contained in the documents by a plurality of subindexes, assigns document identification numbers and word identification numbers to document names and words, respectively, to uniquely identify them, and obtains a corresponding document name from a word serving as a key by using an index registered in a subindex in a two-dimensional array position referenced by a value determined by applying a hash function to a document identification number and a word identification number,
wherein an AND or OR search of a plurality of words is performed in such a way that subindexes for documents grouped by the values obtained by applying a hash function to document identification numbers are searched for the occurrence of each word and the AND or OR operation on the search results is performed.

### Claim 15

An apparatus for creating an index with keys and values associated, to search for a value from a specified key, comprising:
index storing unit that stores an index constituted of a plurality of subindexes;
first function application unit that calculates a first value by applying a predetermined function to a value to be registered;
second function application unit that calculates a second value by applying a predetermined function to a key value; and
storing unit that stores a set of said key and said value to be registered in a subindex within said index storing unit in a two-dimensional array position determined in accordance with said first value and said second value calculated.

### Claim 16

A storage medium storing a program for having a computer create an index with keys and values associated, to search for a value from a specified key, in a format readable from the computer for execution,
wherein said program constitutes an index to register sets of keys and values by a plurality of subindexes and stores the subindexes in two-dimensional array positions referenced by values determined by applying a predetermined function to the values to be registered and values determined by applying a predetermined function to the keys.

### Claim 17

An index of a database in which sets of keys and values are registered,
wherein said index is constituted of a plurality of subindexes, and
each of said subindexes is stored in a storage medium position determined by a first value obtained by applying a predetermined function to a value and a second value obtained by applying a predetermined function to a key.
