# US 11,030,262 B2 · Recyclable private memory heaps for dynamic search indexes

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

- Number: US 11,030,262 B2
- Document ID: US11030262B2
- Status: Granted
- Kind: B2
- Application number: 14/835,522
- Filed: 2015-08-25
- Published: 2017-03-02
- Granted: 2021-06-08
- Earliest claimed: 2015-08-25
- Assignees: Verizon Media Inc.
- Applicants: Oath Inc.
- Inventors: Edward Bortnikov; Guy Gueta; Pranav Sharma
- Web page: https://patentgrep.com/patent/US11030262B2

## CPC

- G06F 16/9538: Presentation of query results
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 16/316: {Indexing structures}
- G06F 16/951: Indexing; Web crawling techniques
- G06F 16/9535: Search customisation based on user profiles and personalisation
- G06F 2212/1024: Latency reduction
- G06F 2212/1028: Power efficiency
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/154: Networked environment
- G06F 2212/163: Server or database system
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

In one embodiment, a search engine may generate and store a plurality of search index segments such that each of the search index segments is stored in a corresponding one of a plurality of heaps of memory. The plurality of search index segments may include inverted index segments mapping content to documents containing the content. A garbage collection module may release one or more heaps of the memory.

## Claims

### Claim 1

A method, comprising:
generating and storing in memory, by a search engine, a first search index segment of a search index, the first search index segment being stored in a first heap of the memory, the first search index segment including one or more first inverted index segments mapping content to a first set of documents, the search index being an inverted index;
generating and storing in the memory, by the search engine, a second search index segment of the search index, the second search index segment being stored in a second heap of the memory concurrent with the first heap of the memory, the second search index segment including one or more second inverted index segments mapping content to a second set of documents, the second set of documents being more recently processed by the search engine than the first set of documents;
updating the second search index segment until a threshold corresponding to a number of documents or an amount of memory has been reached;
responsive to determining that the threshold corresponding to the number of documents or the amount of memory has been reached:
cutting off a current generation of documents associated with the second heap of the memory by changing a status of the second search index segment being stored in the second heap of the memory from a read/write status to a read-only status; and
initiating a next generation of documents by generating a third search index segment of the search index, wherein the third search index segment is assigned the read/write status and is stored in a new heap of the memory associated with the next generation of documents; and
releasing, by a garbage collection module, a third heap of the memory, the third heap of the memory storing a fourth search index segment of the search index, the fourth search index segment generated by the search engine and including one or more third inverted index segments, the third heap of the memory being released based on at least one of a determination that a threshold of amount of memory has been consumed or a determination that a threshold number of search index segments are stored.

### Claim 2 (depends on 1)

The method of claim 1, comprising:
storing in the memory, by the search engine, per-query objects in a fourth heap of the memory that is separate from the first heap, the second heap, and the third heap.

### Claim 3 (depends on 1)

The method of claim 1, wherein the first set of documents corresponds to a first generation of documents and the second set of documents corresponds to a second generation of documents.

### Claim 4 (depends on 1)

The method of claim 1, wherein the third heap comprises the new heap and the fourth search index segment comprises the third search index segment.

### Claim 5 (depends on 1)

The method of claim 1, wherein the second search index segment is generated and stored in real-time as documents are obtained, received, or processed.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first heap of the memory is associated with a first core of a central processing unit (CPU), and wherein the second heap of the memory is associated with a second core of the CPU.

### Claim 7 (depends on 1)

The method of claim 1, comprising: storing, by a central processing unit (CPU) core, an object in one pool of two or more pools associated with the CPU core according to a size of the object.

### Claim 8 (depends on 7)

The method of claim 7, wherein each pool of the two or more pools is associated with at least one range of two or more ranges of object sizes.

### Claim 9

A system, comprising:
one or more processors; and
at least some memory, at least one of the one or more processors or the at least some memory being configured to:
generate and store in memory, by a search engine, a first search index segment of a search index, the first search index segment being stored in a first heap of the memory, the first search index segment including one or more first inverted index segments mapping content to a first set of documents, the search index being an inverted index;
generate and store in the memory, by the search engine, a second search index segment of the search index, the second search index segment being stored in a second heap of the memory concurrent with the first heap of the memory, the second search index segment including one or more second inverted index segments mapping content to a second set of documents, the second set of documents being more recently processed by the search engine than the first set of documents;
update the second search index segment until a threshold corresponding to a number of documents or an amount of memory has been reached;
responsive to determining that the threshold corresponding to the number of documents or the amount of memory has been reached:
cut off a current generation of documents associated with the second heap of the memory by changing a status of the second search index segment being stored in the second heap of the memory from a read/write status to a read-only status; and
initiate a next generation of documents by generating a third search index segment of the search index, wherein the third search index segment is assigned the read/write status and is stored in a new heap of the memory associated with the next generation of documents; and
release, by a garbage collection module, a third heap of the memory, the third heap of the memory storing a fourth search index segment of the search index, the fourth search index segment generated by the search engine and including one or more third inverted index segments, the third heap of the memory being released based on a determination that a threshold of amount of memory has been consumed.

### Claim 10 (depends on 9)

The system of claim 9, at least one of the one or more processors or the memory being configured to:
store, by the search engine, per-query objects in a fourth heap of the memory that is separate from the first heap, the second heap, and the third heap.

### Claim 11 (depends on 9)

The system of claim 9, wherein the first set of documents corresponds to a first generation of documents and the second set of documents corresponds to a second generation of documents.

### Claim 12 (depends on 9)

The system of claim 9, wherein the second search index segment is generated and stored in real-time as documents are obtained, received, or processed.

### Claim 13 (depends on 9)

The system of claim 9, wherein the first heap comprises two or more sub-heaps.

### Claim 14 (depends on 9)

The system of claim 9, wherein the first heap comprises two or more sub-heaps, wherein each one of the two or more sub-heaps is associated with at least one of two or more ranges of object sizes.

### Claim 15 (depends on 13)

The method of claim 13, each of the two or more sub-heaps being associated with at least one central processing unit (CPU) core.

### Claim 16

A non-transitory computer-readable storage medium storing thereon computer-readable storage medium, comprising:
instructions configured to generate and store in memory, by a search engine, a first search index segment of a search index, the first search index segment being stored in a first heap of the memory, the first search index segment including one or more first inverted index segments mapping content to a first set of documents, the search index being an inverted index;
instructions configured to generate and store in the memory, by the search engine, a second search index segment of the search index, the second search index segment being stored in a second heap of the memory concurrent with the first heap of the memory, the second search index segment including one or more second inverted index segments mapping content to a second set of documents, the second set of documents being more recently processed by the search engine than the first set of documents;
instructions configured to update the second search index segment until a threshold corresponding to a number of documents or an amount of memory has been reached;
instructions configured to responsive to determining that the threshold corresponding to the number of documents or the amount of memory has been reached:
cut off a current generation of documents associated with the second heap of the memory by changing a status of the second search index segment being stored in the second heap of the memory from a read/write status to a read-only status; and
initiate a next generation of documents by generating a third search index segment of the search index, wherein the third search index segment is assigned the read/write status and is stored in a new heap of the memory associated with the next generation of documents; and
instructions configured to release a third heap of the memory, the third heap of the memory storing a fourth search index segment of the search index, the fourth search index segment generated by the search engine and including one or more third inverted index segments, the third heap of the memory being released based on a determination that a threshold number of search index segments are stored.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, comprising:
instructions for storing per-query objects in a fourth heap of the memory that is separate from the first heap, the second heap, and the third heap.

### Claim 18 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein releasing the third heap of the memory comprises: releasing a single heap of the memory.

### Claim 19 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the first heap comprises two or more sub-heaps, each of the two or more sub-heaps being associated with at least one central processing unit (CPU) core.

### Claim 20 (depends on 9)

The system of claim 9, at least one of the one or more processors or the memory being configured to:
store, by a central processing unit (CPU) core, an object in one of two or more pools according to a size of the object;
wherein each one of the two or more pools is associated with at least one of two or more ranges of object sizes.

### Claim 21 (depends on 1)

The method of claim 1, wherein releasing, by the garbage collection module, the third heap of the memory comprises:
releasing a single heap of the memory.

### Claim 22 (depends on 1)

The method of claim 1, comprising: selecting the first heap of the memory.

### Claim 23 (depends on 1)

The method of claim 1, comprising:
processing a search query using the search index; and
updating the second search index segment concurrent with processing the search query.

### Claim 24 (depends on 22)

The method of claim 22, comprising: selecting the second heap of the memory.

### Claim 25 (depends on 24)

The method of claim 24, comprising: releasing the first heap of the memory and the second heap of the memory.
