Loading TOC...

XDMP-TOOMANYPOSITIONS

Message Text

Too many positions

Cause

When calculating a positions vector for a query against a particular document, the intermediate positions vector for that document will become larger than the allowable maximum. This is generally the result of combinatorial positions calculations from large and-queries or near-queries within nested element-queries, particularly for large documents with repeating element structures. When one of the terms within an and-query is a very common word (e.g. "the"), this is more likely to happen. The error will only be thrown if the "too-many-positions-error" option is used in the search.

Response

(1) Don't use the "too-many-positions-error" option. This will lead to a false positive with unfiltered search: either filter, or accept the false positives. (2) Improve the data modeling so that the searchable unit is a document, so that positions need not be used to select a particular subscope from many repeating subscopes. (3) Remove common words from and-queries to reduce the number of possibilities that must be examined. Common words often arises when queries are automatically expanded from user phrases. (4) Apply one of the trace events that increases the limit and restart the cluster. This should be applied with great care: it will increase time and space required to resolve queries, which may negatively impact overall system performance. Trace events: "Posting Positions 2X", "Posting Positions 4X", "Posting Positions 1M", "Posting Positions 2M", "Posting Positions 4M", "Posting Positions Max".

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.