Chủ đề liên quan
×
Bỏ qua để tới nội dung chính
Đăng nhập với Microsoft
Đăng nhập hoặc tạo một tài khoản.
Xin chào,
Chọn một tài khoản khác.
Bạn có nhiều tài khoản
Chọn tài khoản bạn muốn đăng nhập.

The Search Results Web Part shows the search results of a query that was entered in a Search Box Web Part.

By default, the classic Search Results Web Part is used on all default search vertical pages in the classic Search Center. Tìm hiểu về trải nghiệm tìm kiếm cổ điển và hiện đại. Tính năng tìm kiếm dọc được tùy chỉnh cho việc tìm kiếm nội dung cụ thể, chẳng hạn như (Tấtcả mọi thứ,Mọi người ,Cuộc hội thoại , và Video), và chúng hiển thị kết quả tìm kiếm được lọc và định dạng cho một loại hoặc lớp nội dung cụ thể. The Search Results Web Part shows search results, and it also sends the search results to the Refinement Web Part and to the Search Navigation Web Part.

Lưu ý: Hãy xem Cấu hình Phần Web Tìm kiếm Nội dung trong SharePoint để thêm Phần Web Tìm kiếm Nội dung (CSWP) vào trang của bạn và cấu hình Phần Web đó cho các kết quả đơn giản và nâng cao.

The Search Results Web Part uses a query that's specified in the Web Part to show search results. As a SharePoint Online administrator, you can change the query or other settings for displaying search results.

To add and configure a Search Results Web Part on a page, see About configuring the Search Results Web Part. You can also find additional information see Configure properties of the Search Results Web Part in SharePoint Server.

Bạn muốn làm gì?

Change the query in the Search Results Web Part

The Search Results Web Part uses a query that is specified in the Web Part to show search results. By default, this query uses the query variable {searchboxquery}. The query variable is a placeholder for a value, which means that when you run the query, a value replaces the placeholder. For example, when a user types the search term yellow in the Search Box, the {searchboxquery} variable in the Search Results Web Part searches for all items that contain the phrase yellow.

By changing the query in the Search Results Web Part, you can:

  • Change the result source to specify which content should be searched. 

  • Add query variables or property filters to customize search results for different users or user groups.

  • Promote or demote items or pages within the search results.

  • Change the sorting of search results.

There are two main ways of changing the query:

Define the query by using Keyword Query Language (KQL) in Advanced Mode

  1. Trên trang kết quả tìm kiếm, hãy bấm Thiết đặt, rồi bấm Sửa Trang. Trang kết quả tìm kiếm được mở ở chế độ Sửa.

  2. In the Search Results Web Part, move the pointer to the right of the Web Part title, click the arrow, and then click Edit Web Part on the menu. The Search Results Web Part tool pane opens under the ribbon in the top right of the page.

  3. In the Web Part tool pane, in the Search Criteria section, click Change query. The Build Your Query dialog box opens in Advanced Mode.

  4. On the BASICS tab, in the Select a query section, select a result source to specify which content should be searched.

  5. You can now change the Query text. By default, the query variable {searchboxquery} is defined. Change the query text by using Keyword Query Language (KQL), or use the Keyword filter and Property filter lists to build the query:

    • The keyword query can consist of free-text keywords, property filters, or operators. Use braces to enclose query variables. The query variables will be replaced with a value when the query is run. Keyword queries have a maximum length of 2,048 characters. Để biết thêm thông tin về KQL, hãy xem Tham khảo cú pháp Ngôn ngữ Truy vấn Từ khóa (KQL).

    • Use keyword filters to add query variables to your query. Select predefined query variables from the list, and then add them to the query by clicking Add keyword filter. For a list of available query variables, see Query variables in SharePoint Server 2013.

    • Use property filters to query the content of managed properties that are set to queryable in the search schema. Select managed properties from the Property filter lists. Bấm Thêm bộ lọc thuộc tính để thêm bộ lọc vào truy vấn.

      Lưu ý: Các thuộc tính được quản lý tùy chỉnh không hiển thị trong danh sách Bộ lọc thuộc tính. To add a custom managed property to your query, in the Query text box, enter the name of your custom managed property followed by the query condition, for example MyCustomColorProperty:Green

  6. Click Test query to see a preview of the search results.

  7. You can also add more details to your query:

  8. Click OK to save the query and return to the Web Part tool pane.

Add refiners

On the REFINERS tab, you can choose to limit returned results by adding preselected refiners to your query.

You can specify that the search results that are returned in the Search Results Web Part should be limited to one or more values from the refiners. The list shows all managed properties that are enabled as refiners in the search schema.

  • To add a refiner to the query, choose a refiner from the list, and then click Add.

You can specify that the search results should be grouped based on one or more managed properties. This is useful when there are several variants for a given item, and you want to group them under a single result.

  • To define grouping of results, click Show more to show the Group results section.

Xác định sắp xếp

Use the SORTING tab to specify how to sort search results. Bạn có thể xác định một số mức độ sắp xếp và thêm quy tắc để sắp xếp thứ tự động.

The Sort by list shows all managed properties that are set as sortable in the search schema.

  • To sort results based on managed properties:

    1. In the Sort by list, select a managed property, and then select Descending or Ascending.

    2. To add more sorting levels, click Add sort level.

  • To sort results by relevance rank:

    1. In the Sort by list, select Rank.

    2. (Optional) Under Dynamic ordering, you can specify additional ranking by adding rules that will change the order of results when certain conditions apply. Click Add dynamic ordering rule, and then specify conditional rules.

Thêm thiết đặt khác

Use the Settings tab to select more settings for your query. You can choose to use query rules, use URL rewriting, and specify whether to remove duplicate results or not.

Thử truy vấn

Tab Thử hiện văn bản truy vấn cuối cùng dựa trên những gì bạn đã chọn ở các tab khác. Bạn có thể thử truy vấn thay thế bằng cách sửa trực tiếp văn bản truy vấn. Bạn cũng có thể thử các tùy chọn truy vấn khác bằng cách bấm Hiện thêm.

Lưu ý: Bất kỳ thay đổi nào bạn tạo ra đối với truy vấn trong tab Thử đều không được lưu.

Phần

Mô tả

Văn bản truy vấn:

Shows the final query that will be run by the Search Results Web Part. The final query text is based on the original query template where dynamic variables are replaced with current values. Other changes to the query may be made as part of a query rule.

Click Show more to display more information.

Mẫu truy vấn

The content of the query template that is applied to the query.

Tinh chỉnh theo

The refiners that are applied to the query, as defined on the REFINERS tab.

Nhóm theo

The managed property on which search results should be grouped, as defined in the REFINERS tab.

Quy tắc truy vấn được áp dụng

Hiển thị quy tắc truy vấn nào được áp dụng cho truy vấn.

Biến mẫu truy vấn

The query variables that will be applied to the query and the values of the variables that apply to the current page. Type other values to test the effect they will have on the query.

User segment terms

Test how the query works for different user segment terms. Click Add user segment term to add terms to the query.

Test query

Click the Test Query button to preview the search results.

Đầu Trang

Define the query by using predefined values in Quick Mode

  1. On the BASICS tab, make sure that you are in Advanced Mode. Click Switch to Quick Mode in the top right corner if you are in Advanced Mode.

  2. In the Select a query section, select a result source to specify which content should be searched.

  3. In the Restrict by app section, select an option from the list to restrict results to a specific site, library, list, or URL.

  4. Choose options in the Restrict by tag section to limit results to content that's tagged with a term from a term set:

  5. Don’t restrict by any tag: Search results will not be limited based on tags (default).

  6. Restrict by navigation term of current page: Search results will be limited to content that's tagged with the term of the current page. The current tag is shown as the last part of the friendly URL. This choice only makes sense if your site uses managed navigation.

  7. Restrict by current and child navigation: Search results will be limited to content that's tagged with the term of the current page (shown as the last part of the friendly URL), and content that's tagged with subterms of the current page. Only relevant if your site uses managed navigation.

  8. Restrict on this tag: Search results will be limited to content that's tagged with the tag that you type in the box.

  9. You can also add more details to your query:

  10. Click OK to save the query and return to the Web Part tool pane.

Đầu Trang

Change display template settings

  1. Trên trang kết quả tìm kiếm, hãy bấm Thiết đặt, rồi bấm Sửa Trang. Trang kết quả tìm kiếm được mở ở chế độ Sửa.

  2. In the Search Results Web Part, move your pointer to the right of the Web Part title, click the arrow, and then click Edit Web Part on the menu. The Search Results Web Part tool pane opens under the ribbon in the top right of the page.

  3. In the Web Part tool pane, in the Display Templates section, in the Results Control Display Template list, you can choose a display template to control the overall look of the Web Part.

  4. In the other lists in this section, you choose a display template for individual results:

    • The default selection is Use result types to display items. This selection will apply different display templates according to the result type of the search result. For example, if the result type of a search result is a PDF file, the display template PDF Item is applied. If the result type of a search result is an image, the Picture Item display template is applied.

    • To apply one display template to all result types of the search results, select Use a single template to display items, and then select the display template that you want to apply.

Xem mục Thay đổi cách hiển thị kết quả tìm kiếm bằng cách sử dụng loại kết quả và mẫu hiển thị để biết thêm thông tin.

Đầu Trang

Change Results settings and Results control settings

  1. Trên trang kết quả tìm kiếm, hãy bấm Thiết đặt, rồi bấm Sửa Trang. Trang kết quả tìm kiếm được mở ở chế độ Sửa.

  2. In the Search Results Web Part, move your pointer to the right of the Web Part title, click the arrow, and then click Edit Web Part on the menu. The Search Results Web Part tool pane opens under the ribbon in the top right of the page.

  3. In the Web Part tool pane, in the Settings section, change Results Settings to specify how results are shown:

If you select

Then the Web Part displays

Selected by default

Number of results per page

The maximum number of search results displayed per page.

Show ranked results

Ranked results.

Xóa để chỉ hiện khối tăng cấp (chẳng hạn như kết quả được tăng cấp) hoặc điều khiển kết quả (chẳng hạn như số đếm kết quả).

Show promoted results

Search results that are promoted by using query rules.

Show "Did you mean?"

Query spelling corrections as Did you mean suggestions.

Show View Duplicates link

A View Duplicates link that users can click to view results that were classified as duplicates.

Không

Show link to search center

Link to the Search Center.

Không

4. In the Web Part tool pane, in the Cài đặt section, change Results control settings to specify more options for what to show in the Search Results Web Part:

If you select

Then the Web Part displays

Selected by default:

Show advanced link

A link to the Advanced Search page.

Show result count

The number of results found.

Show language dropdown

A language drop-down list. Gives users a way to switch the language of their query. The drop-down list will only appear if the user's selected two or more languages from the search user preferences page

Show sort dropdown

A sort drop-down list. Gives users a way to change the sort order of results.

Không

Show paging

A paging control below the search results.

Show preferences link

A link to the search user preferences page.

Show AlertMe link

A link to the Alert Me page.

Thay đổi cách hiển thị kết quả từ nội dung riêng của OneDrive người dùng

Theo mặc định, người dùng nhìn thấy kết quả từ nội OneDrive và SharePoint chung, không phải từ nội dung riêng tư của họ. Nội OneDrive là nội dung riêng của họ mà chỉ có họ có quyền truy nhập.

Bạn có thể thiết lập kết quả tìm kiếm để hiển thị một khối riêng có chứa kết quả từ nội dung riêng tư của người OneDrive người dùng.

  1. Trên trang kết quả tìm kiếm, hãy bấm Thiết đặt, rồi bấm Sửa Trang. Trang kết quả tìm kiếm được mở ở chế độ Sửa.

  2. In the Search Results Web Part, move your pointer to the right of the Web Part title, click the arrow, and then click Edit Web Part on the menu. The Search Results Web Part tool pane opens under the ribbon in the top right of the page.

  3. In the Web Part tool pane, in the Cài đặt section, go to Also show results from and select "Their own OneDrive".

If you select

Then the Web Part displays

Selected by default

Thông tin cá nhân OneDrive

Một khối riêng biệt với các kết quả từ sổ tay riêng của OneDrive người dùng, bao gồm nội dung mà chỉ chủ sở hữu có quyền truy nhập.

Không

Đầu Trang

Xem thêm:

Bạn cần thêm trợ giúp?

Bạn muốn xem các tùy chọn khác?

Khám phá các lợi ích của gói đăng ký, xem qua các khóa đào tạo, tìm hiểu cách bảo mật thiết bị của bạn và hơn thế nữa.

Cộng đồng giúp bạn đặt và trả lời các câu hỏi, cung cấp phản hồi và lắng nghe ý kiến từ các chuyên gia có kiến thức phong phú.

Thông tin này có hữu ích không?

Bạn hài lòng đến đâu với chất lượng dịch thuật?
Điều gì ảnh hưởng đến trải nghiệm của bạn?
Khi nhấn gửi, phản hồi của bạn sẽ được sử dụng để cải thiện các sản phẩm và dịch vụ của Microsoft. Người quản trị CNTT của bạn sẽ có thể thu thập dữ liệu này. Điều khoản về quyền riêng tư.

Cảm ơn phản hồi của bạn!

×