Skip to content

Main content

Query Phrase Missing Token Position Flag Tool

Locate missing supplied phrase tokens by original position, preserving duplicates and exact case.

Loading tool…

Description

For each phrase token, test exact membership in availableTokens and return zero-based missing positions and their tokens.

Search metrics and positional checks depend on rank origins, token positions, relevance definitions, and tie or gap conventions. One term is not a complete query or retrieval evaluation.

For each phrase token, test exact membership in availableTokens and return zero-based missing positions and their tokens.

When to use this tool

Use Query Phrase Missing Token Position Flag when you need one rank contribution or token-position diagnostic.

How to use the tool and how it works

  1. Enter phraseTokens, availableTokens. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read missingPositions, missingTokens. Use the output convention below.

For each phrase token, test exact membership in availableTokens and return zero-based missing positions and their tokens.1

Input fieldMeaning and unitsAccepted input
phraseTokensPhrase TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
availableTokensAvailable TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
missingPositionsMissing PositionsRequired. Array of safe integer; maximum items 256.
missingTokensMissing TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
json
{
  "input": {
    "phraseTokens": [
      "a",
      "b",
      "a"
    ],
    "availableTokens": [
      "a"
    ]
  },
  "output": {
    "missingPositions": [
      1
    ],
    "missingTokens": [
      "b"
    ]
  }
}

Limitations and assumptions

  • Order and repeated-token multiplicity are not enforced; this is a presence test rather than phrase matching.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Evaluate complete queries and result sets under a documented tokenization, relevance, and aggregation policy.

References

  1. Calculation and input contract: information-science/query-phrase-missing-token-position-flag — tool.io

Similar or alternative tools

  • Query Phrase Slop One Gap

    Subtract firstPosition from secondPosition for observedGap, then compare its absolute difference from expectedGap inclusively with allowedSlop.

  • Indexing Stopword Position Increment

    Retain unflagged tokens with zero-based originalPositions and increments from the prior retained position, beginning from -1.