Abstract:How to process twig query quickly and correctly has attracted much attention in research society recently. Filtering query irrelevant elements before query execution is an important step for reducing elements scanned at query processing. As a flattened structural index, F-Index is proposed to filter out all query irrelevant index nodes, thus query irrelevant elements can be filtered out rapidly and mostly, especially when it is processing deeply nested XML documents with a complex structure. After filtering, a new efficient query algorithm based on the remaining elements is proposed to accelerate query processing. Experimental results on various datasets indicate that twig query’s performance can be improved significantly by using F-Index.