Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Document the `query_scope` search index option

Aperta
#1,997 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@joshdaugherty ci sta già lavorando.

Dal 29/9/2026.

  • #1998 di @joshdaugherty — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
18/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
php
Ambito
documentation

Direzione di ricerca

The work is the Search page of the docs repo, plus the 5 to 6 upgrade guide's mention of query scopes. The behaviour to describe is in Statamic\Search\Searchables\Provider::applyQueryScope() in the CMS source on 6.x. Pull request #1998 is already open against this issue, so review it before starting; a newcomer's contribution would be a review comment, not a second PR.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The query_scope option for search indexes, added in statamic/cms#13126 (6.0), isn't documented on the Search page. The page covers filter, and the 5 to 6 upgrade guide already recommends query scopes over filtering for custom searchables, but it doesn't say how to set one on an index.

From Statamic\Search\Searchables\Provider::applyQueryScope() and the built-in searchables on 6.x, these are worth covering:

  • The value is a scope handle. The scope is applied to the query before any items are loaded, which is why it's faster than filter on large indexes.
  • Unlike filter, it doesn't override the native filters, so draft entries are still left out of the index.
  • The entries, terms and users searchables apply it. The assets searchable doesn't.

I'll open a PR for this.

Lingua principale
PHP
Stelle
133
Fork
405
Merge medio
21h 45m
PR unite (30g)
12

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di statamic/docs

Tutte le issue di statamic/docs

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.