XQuery Full-Text Search Evaluation Using Iterator-Based FTSelection Trees

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

XQuery 1.0 lacks an efficient evaluation strategy for full-text search queries, leading to performance issues when executing XQuery FT code that defines the semantics of the full-text extension.

Innovation Solution

Implementing an iterator evaluation model for FTSelection trees, allocating memory for execution states at compile time, and integrating word and phrase search with inverted index lists to avoid materializing all Match instances and optimize memory and CPU usage, while ensuring at most a single scan of documents and sharing FTSelection trees among concurrent processing threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If XQuery FT code is executed using standard XQuery evaluation, then full-text search functionality is achieved, but memory and CPU requirements become excessively high

Engineering Contradiction:
Improvefull-text search functionalityVSAvoidmemory and CPU requirements
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent segments the evaluation process by separating the compilation phase (which creates the FTSelection tree) from the execution phase (which evaluates the tree using optimized iterators). This allows the expensive full-text search operations to be performed once during compilation and cached, rather than being re-executed for each query, thereby reducing memory and CPU requirements during actual query processing while maintaining full-text search functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by pre-compiling the XQuery FT code into an FTSelection tree structure during a compilation phase before actual query execution. This pre-processing creates an optimized representation that can be efficiently evaluated multiple times without re-parsing or re-compiling, significantly reducing the computational resources required during runtime while preserving the full-text search capability.

Inventive Principle:
Principle #10Preliminary action

2Loss of information

If all Match instances are materialized during FTSelection tree evaluation, then complete search results are obtained, but memory consumption increases significantly

Engineering Contradiction:
Improvesearch results completenessVSAvoidmemory consumption
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential information needed for full-text search evaluation from the Match instances, rather than materializing complete result sets. The FTSelection tree evaluation uses iterators that process Match instances on-demand, extracting only the necessary matching criteria information while discarding redundant data, thereby maintaining search result completeness while minimizing memory consumption.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent employs temporary, disposable data structures during the evaluation process that are created and discarded as needed. The iterator-based evaluation uses lightweight temporary objects to hold intermediate matching results during traversal, rather than maintaining persistent storage for all Match instances, allowing complete search results to be obtained through sequential processing while keeping memory consumption low.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

3Reliability

If multiple scans of documents are performed during full-text search, then thorough search coverage is achieved, but query execution time increases

Engineering Contradiction:
Improvesearch coverageVSAvoidquery execution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent merges multiple document scan operations into a single unified traversal of the FTSelection tree. By combining the evaluation of multiple full-text search conditions into one pass through the document collection using shared iterators, the system achieves thorough search coverage equivalent to multiple separate scans while reducing query execution time by eliminating redundant document access and processing overhead.

Inventive Principle:
Principle #5Merging (Combining)

4Ease of manufacture

If FTSelection trees are not optimized for concurrent access, then implementation simplicity is maintained, but performance degrades under concurrent processing

Engineering Contradiction:
Improveimplementation simplicityVSAvoidconcurrent processing performance
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent designs the FTSelection tree structure to serve multiple concurrent query processing threads simultaneously. The tree is compiled once and can be evaluated by multiple iterators in parallel, making it a universal structure that supports both sequential and concurrent execution modes. This multi-functional design maintains implementation simplicity while enabling high concurrent processing performance through shared read-only tree structures and thread-safe iterator evaluation.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8312030B2Efficient evaluation of XQuery and XPath full text extension
Publication Date: 2012.11.13 ORACLE INT CORP
  • US8312030B2 patent drawing
  • US8312030B2 patent drawing
  • US8312030B2 patent drawing

AI summary

Techniques are provided for efficiently evaluating XML queries that conform to an extension of an XML language (e.g., XQuery or XPath). The extension allows XML queries to have full-text search capabilities. Such an XML query is compiled to generate a tree of nodes that correspond to one or more conditions in the full-text portion of the query. In one technique, the amount of memory for the execution state of the tree is determined at compile time and allocated only once throughout execution of the query. In another technique, to ensure at most a single scan of a document, all the words or phrases in the full-text portion of an XML query are located before any of the other conditions in the full-text portion are evaluated. In another technique, the elements of the full-text portion of an XML query are analyzed to determine, based at least in part on cost, which evaluation strategy, of a plurality of evaluation strategies, should be employed.