Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Document the `query_scope` search index option

Đang mở
#1,997 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@joshdaugherty đang làm issue này rồi.

Từ ngày 29/9/2026.

  • #1998 của @joshdaugherty — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
18/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
documentation

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
PHP
Star
133
Fork
405
Merge trung bình
21 giờ 45 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của statamic/docs

Tất cả issue của statamic/docs

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.