I want to know the best practice in using Item Queries and Search scope.
When should i use Item queries and when to use search scope as both of them is used in building queries
Any advise?
The two features are similar in that they make use of the Query Builder
field type, and are used in searching for items by SXA.
Item Queries is used by list components such as the following:
You can create custom queries under Settings > Item Queries, which will be bundled up with queries that come OOTB. You can also code a custom one like here from Richard Seal.
On the Page List you can see the query configured using the Source Type parameter.
Search Scope is used by other search enabled components which all get wired together using a common search signature. You can scope search in the following ways:
On the Search Results component you can see the scope configured using the Search Scope parameter.
On the page you can configure the scope under the Search Criteria section.
On the Settings item you can configure the scope under Search Criteria section.
Note: Something I am not clear on is whether the Item Queries acknowledge the scope defined under Settings or on the page.