﻿# Separate You.com query operators from structured request controls

Keep You.com query syntax and request filters in separate fields so domain restrictions, boosts, and file-type intent remain testable.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-you-search-domain-operators/
Language: en

## Give each input an owner

A documentation assistant may accept a user's technical question while an administrator restricts which publishers can supply evidence. Combining both into an opaque query string makes the restriction difficult to inspect or change. Store the question and the application controls separately, then build the provider request from those explicit values.

## Use operators for query expression

You.com's [operator guide](https://you.com/docs/guides/search/search-operators) documents `site:`, `filetype:`, exact-term inclusion, exclusion, and Boolean combinations inside `query`. These can express a searcher's information need, such as looking for a PDF that discusses either of several terms. Keep the original query available when diagnosing why particular candidates were retrieved.

## Distinguish restriction from preference

The [request controls guide](https://you.com/docs/guides/search/request-controls) defines `include_domains` as a strict allowlist and `boost_domains` as preference without excluding other domains. `exclude_domains` removes unwanted domains. A product requiring official documentation should not implement that requirement through boosting alone, because a preference deliberately preserves other candidates.

For a package migration question, the user can request a specific identifier while the application supplies its approved publisher list. This gives the interface a clear explanation when the restricted search returns no usable evidence. It also avoids quietly weakening the rule to fill an otherwise empty answer.

## Keep transport choices explicit

Current documentation directs new features to `POST /v1/search`; the older GET route remains available with a narrower evolution path. Consult the [Search reference](https://you.com/docs/api-reference/search/v1-search) when constructing the structured body. Do not flatten arrays into ad hoc punctuation merely because a legacy client previously accepted a query string.

## Evaluate the controls independently

Compare an unrestricted baseline, a structured allowlist, and a boost using the same information need. Inspect result URLs as well as answer quality. Then test the query operator separately, including a deliberately conflicting user expression. Record how the application resolves that conflict rather than allowing a model to choose the effective policy implicitly.

The guides to [exact identifiers in retrieval](/journal/russian-bm25-analyzer-exact-identifiers/) and [relevance judgments](/journal/beir-qrels-unjudged-retrieval-evaluation/) support this evaluation design. The outcome should reveal which control changed candidate eligibility and which merely changed ordering, without treating both effects as one relevance score.
