Podcast
Questions and Answers
What search functionality does Configured Commerce use by default for storefronts?
What search functionality does Configured Commerce use by default for storefronts?
- Elasticsearch version 5.5 (correct)
- Apache Solr
- PostgreSQL
- MongoDB Atlas
What does the CreateElasticsearchCategory operation do in the search pipeline?
What does the CreateElasticsearchCategory operation do in the search pipeline?
- Maps properties from a SQL database
- Indexes a collection of categories
- Retrieves an existing ElasticsearchCategory
- Creates a new ElasticsearchCategory object (correct)
What kind of query does GetIndexableCategoriesQuery create?
What kind of query does GetIndexableCategoriesQuery create?
- Entity Framework Category query (correct)
- REST API query for products
- GraphQL query for orders
- SQL query for retrieving users
Under what conditions does MapElasticSearchCategoryCustomProperties set result.Property?
Under what conditions does MapElasticSearchCategoryCustomProperties set result.Property?
What does the InitializeSearchProperties operation retrieve?
What does the InitializeSearchProperties operation retrieve?
Which version of Elasticsearch should be referred to for updated search pipelines?
Which version of Elasticsearch should be referred to for updated search pipelines?
What action is performed by the RunCategorySearch operation?
What action is performed by the RunCategorySearch operation?
What does the term 'IndexableCategories' refer to in the context of the search pipeline?
What does the term 'IndexableCategories' refer to in the context of the search pipeline?
What is the purpose of using the result.DisallowedCategories List in the cache key?
What is the purpose of using the result.DisallowedCategories List in the cache key?
Which filter is applied to restrict search results to a specific language?
Which filter is applied to restrict search results to a specific language?
What will happen if result.SiteContext.WebsiteDto is null?
What will happen if result.SiteContext.WebsiteDto is null?
How does the Parameter.AddTypeFilter function in the search process?
How does the Parameter.AddTypeFilter function in the search process?
What does the CombineFilters operation do with result.AllFilters?
What does the CombineFilters operation do with result.AllFilters?
When creating a MultiMatchQuery search type, what is the source of the query?
When creating a MultiMatchQuery search type, what is the source of the query?
What is the purpose of the FunctionScoreQuery in the search process?
What is the purpose of the FunctionScoreQuery in the search process?
What type of query does FormFuzzySearch create in the search process?
What type of query does FormFuzzySearch create in the search process?
What is the first action taken if 'result.SearchResponse.Aggregations' does not contain 'PerformSearch.ContentAggregationKey'?
What is the first action taken if 'result.SearchResponse.Aggregations' does not contain 'PerformSearch.ContentAggregationKey'?
What happens to 'result.ContentSearchResults' if it is found to be empty?
What happens to 'result.ContentSearchResults' if it is found to be empty?
Which key is used to create new instances of 'ContentSearchResultDto'?
Which key is used to create new instances of 'ContentSearchResultDto'?
What is selected from 'result.SearchResponse' after checking 'result.SearchResponse.Aggregations'?
What is selected from 'result.SearchResponse' after checking 'result.SearchResponse.Aggregations'?
If 'PerformSearch.TopHitsAggregationKey' does not yield a result, what is the next probable step?
If 'PerformSearch.TopHitsAggregationKey' does not yield a result, what is the next probable step?
Which of the following occurs when 'result.SearchResponse.Hits' is not null?
Which of the following occurs when 'result.SearchResponse.Hits' is not null?
What does 'result.SearchResponse.Aggregations' hold in the context of processing?
What does 'result.SearchResponse.Aggregations' hold in the context of processing?
Which variable is assigned the collection of new 'ContentSearchResultDto' after processing?
Which variable is assigned the collection of new 'ContentSearchResultDto' after processing?
What is the purpose of combining individual FieldQueries into a BooleanQuery using Operation.Or?
What is the purpose of combining individual FieldQueries into a BooleanQuery using Operation.Or?
Which of the following conditions will cause the query to skip to the next pipe?
Which of the following conditions will cause the query to skip to the next pipe?
What does the result.ProductIdFilter contain after combining FieldQueries?
What does the result.ProductIdFilter contain after combining FieldQueries?
What happens if result.AllFilters is empty?
What happens if result.AllFilters is empty?
How are filters from parameter.ProductSearchParameter.ProductErpNumbers processed?
How are filters from parameter.ProductSearchParameter.ProductErpNumbers processed?
What role does the IPerRequestCacheManager play in the filtering process?
What role does the IPerRequestCacheManager play in the filtering process?
Which operation is used to combine all filters in result.AllFilters into one?
Which operation is used to combine all filters in result.AllFilters into one?
What is the result of executing a FieldQuery against the ISearchProductObject.Name field?
What is the result of executing a FieldQuery against the ISearchProductObject.Name field?
What should be done if 'ProductLinesEnabled' is true and there are brands with non-empty 'ProductLineName'?
What should be done if 'ProductLinesEnabled' is true and there are brands with non-empty 'ProductLineName'?
What happens if 'parameter.Criteria' is null?
What happens if 'parameter.Criteria' is null?
What is the purpose of creating the variable 'queryWords'?
What is the purpose of creating the variable 'queryWords'?
What should be done to brands that do not match any 'queryWords'?
What should be done to brands that do not match any 'queryWords'?
What is the outcome of grouping 'result.BrandSearchResult.Brands' by 'Id' and 'ProductLineId'?
What is the outcome of grouping 'result.BrandSearchResult.Brands' by 'Id' and 'ProductLineId'?
What is the function of the ProductSearchPipeline's FormProductFilter pipeline?
What is the function of the ProductSearchPipeline's FormProductFilter pipeline?
What condition leads to skipping to the next processing pipe without taking action?
What condition leads to skipping to the next processing pipe without taking action?
What does the initialization process with Dependency Injection attach to the result object?
What does the initialization process with Dependency Injection attach to the result object?
Flashcards
CategoryIndexerPipeline
CategoryIndexerPipeline
A pipeline responsible for creating and indexing Elasticsearch categories.
CreateElasticsearchCategory
CreateElasticsearchCategory
Creates an ElasticsearchCategory object from input data.
GetIndexableCategoriesQuery
GetIndexableCategoriesQuery
Forms an Entity Framework query for indexable categories from input data.
MapElasticSearchCategoryCustomProperties
MapElasticSearchCategoryCustomProperties
Signup and view all the flashcards
CategorySearchPipeline
CategorySearchPipeline
Signup and view all the flashcards
InitializeSearchProperties
InitializeSearchProperties
Signup and view all the flashcards
FormCategoryExcludeFilter
FormCategoryExcludeFilter
Signup and view all the flashcards
FormLanguageFilter
FormLanguageFilter
Signup and view all the flashcards
FormWebsiteFilter
FormWebsiteFilter
Signup and view all the flashcards
FormTypeFilter
FormTypeFilter
Signup and view all the flashcards
CombineFilters
CombineFilters
Signup and view all the flashcards
FormMainSearchQuery
FormMainSearchQuery
Signup and view all the flashcards
FormFuzzySearchQuery
FormFuzzySearchQuery
Signup and view all the flashcards
CombineQueries
CombineQueries
Signup and view all the flashcards
ApplyQueryAndFilter
ApplyQueryAndFilter
Signup and view all the flashcards
GetRestrictionGroupFilter
GetRestrictionGroupFilter
Signup and view all the flashcards
ProcessProductLines
ProcessProductLines
Signup and view all the flashcards
FormProductIdFilter
FormProductIdFilter
Signup and view all the flashcards
FormProductNameFilter
FormProductNameFilter
Signup and view all the flashcards
FormProductErpNumberFilter
FormProductErpNumberFilter
Signup and view all the flashcards
RunProductFacetSearch
RunProductFacetSearch
Signup and view all the flashcards
FormBrandStartsWithFilter
FormBrandStartsWithFilter
Signup and view all the flashcards
FormProductFilter
FormProductFilter
Signup and view all the flashcards
Study Notes
Search Pipeline
- Configured Commerce uses Elasticsearch version 5.5 (Nest5) for search functionality on customer storefronts.
- The pipelines outlined apply only to Elasticsearch version 5.5 (Nest5).
- If upgrading to or using Elasticsearch version 7.10 (Nest7), refer to the Third-party search pipelines.
CategoryIndexerPipeline
- CreateElasticsearchCategory: This pipe creates a new ElasticsearchCategory object using the fields from the parameter object and assigns it to
result.ElasticsearchCategory
. - GetIndexableCategoriesQuery: This pipe creates an Entity Framework Category query using the parameter object's fields and assigns it to
result.IndexableCategories
. - MapElasticSearchCategoryCustomProperties: This pipe sets
result.Property
to a new Nest TextProperty if theparameter.SearchBoost.IsQueryable
andparameter.PropertyDefinition.IsCustomProperty
are both true.
CategorySearchPipeline
- InitializeSearchProperties: Retrieves the current SiteContext, ElasticsearchIndex, and ElasticsearchQueryBuilder and assigns them to the result object. The cache key is based on "CategorySearchDisallowedCategories + ".
- FormCategoryExcludeFilter: Uses the
result.DisallowedCategories
list to filter out categories generated during theFormCategoryExcludeList
pipe processing. - FormLanguageFilter: Uses
result.SiteContext.LanguageDto
to filter search results to a specific LanguageCode. If this pipe isn't processed, it will include results from all languages. - FormWebsiteFilter: Uses
result.SiteContext.WebsiteDto
to filter search results to a specific Website. Ifresult.SiteContext.WebsiteDto
is null, it will cause a Pipeline exception/error. - FormTypeFilter: This pipe adds a Query Filter for 'type' equaling 'category' if
Parameter.AddTypeFilter
is true. - CombineFilters: This pipe combines all the filters in
result.AllFilters
into a single SearchQuery with an Operation of 'And' and sets the query toresult.CombinedFilter
. If no filters are found,result.CombinedFilter
will be set tonull
. - FormMainSearchQuery: This pipe creates a SearchQuery from
result.CategorySearchFields
against the parameter.Criteria query value for a MultiMatchQuery & MultiMatchPrefixQuery search type. - FormFuzzySearchQuery: This pipe creates a SearchQuery from
result.CategorySearchFields
against the parameter.Criteria query value for a MultiMatchFuzzyQuery search type. - CombineQueries: Combines all the queries in
result.AllQueries
into a single SearchQuery with an Operation of 'Or' and sets the query toresult.CombinedQuery
. - ApplyQueryAndFilter: Creates a FunctionScoreQuery attaching as a new SearchDescriptor. The Score Function is for the Boost Field with a FunctionBoostMode.Multiply boost function.
- ProcessSearchResponse: If the
result.SearchResponse.Aggregations
does not containPerformSearch.ContentAggregationKey
, continues to the next pipe. Selects fromPerformSearch.ContentAggregationKey
Items, anyPerformSearch.TopHitsAggregationKey
using theparameter.SearchContentMapper.ToContentSearchResultDto
to create newContentSearchResultDto
, and assigns the resulting collection toresult.ContentSearchResults
. - ProcessSearchResponseForAllAggregations: If the
result.SearchResponse.Aggregations
does not containPerformSearch.ContentAggregationKey
, continues to the next pipe. Selects fromresult.SearchResponse.Aggregations
allPerformSearch.TopHitsAggregationKey
using theparameter.SearchContentMapper.ToContentSearchResultDto
to create newContentSearchResultDto
, and assigns the resulting collection toresult.ContentSearchResults
. - ProcessSearchResponseFromResult: If
result.ContentSearchResults
is empty, continues to the next pipe. Selects fromresult.SearchResponse.Hits
all not null using theparameter.SearchContentMapper.ToContentSearchResultDto
to create newContentSearchResultDto
, and assigns the resulting collection toresult.ContentSearchResults
.
FormProductIdFilter
- Makes a FieldQuery for each product in
parameter.ProductSearchParameter.ProductIds
against theISearchProductObject.ProductId
field, combines them into a BooleanQuery using theOperation.Or
, assigns it toresult.ProductIdFilter
, and addsresult.ProductIdFilter
toresult.AllFilters
. - If
parameter.ProductSearchParameter.ProductNames
isnull
or empty, continues to the next pipe.
FormProductNameFilter
- Makes a FieldQuery for each product in
parameter.ProductSearchParameter.ProductNames
against theISearchProductObject.Name
field, combines them into a BooleanQuery using theOperation.Or
, assigns it toresult.ProductNameFilter
, and addsresult.ProductNameFilter
toresult.AllFilters
. - If
parameter.ProductSearchParameter.ProductErpNumbers
isnull
or empty, continues to the next pipe.
FormProductErpNumberFilter
- Makes a FieldQuery for each product in
parameter.ProductSearchParameter.ProductErpNumbers
against theISearchProductObject.ErpNumberSort
field, combines them into a BooleanQuery using theOperation.Or
, assigns it toresult.ProductErpNumberFilter
, and addsresult.ProductErpNumberFilter
toresult.AllFilters
.
CombineFilters
- Makes a BoolQuery with the Operation.And of all filters in
result.AllFilters
and assigns it toresult.CombinedFilter
ornull
if filters are empty.
GetRestrictionGroupFilter
- Attempts to retrieve the Restriction Group filter from the
IPerRequestCacheManager
cache based onparameter.SiteContext.BillTo.Id
andparameter.SiteContext.ShipTo.Id
, and assigns it toresult.RestrictionGroupFilter
. - If
parameter.ProductLinesEnabled
is true and has result.BrandSearchResult.Brands that do not have a blank 'ProductLineName', ordersresult.BrandSearchResult.Brands
using OrderByDescending by 'Score'. - If the prior checks pass, fall back to sorting by
Score
for theparameter.MaximumNumber
. Then set brand results toresult.BrandSearchResult.Brands
. - If
parameter.Criteria
is null,result.BrandSearchResult?.Brands
isnull
, orresult.BrandSearchResult.Brands
allProductLineNames
are empty, continue on to the next pipe.
ProcessProductLines
- Creates a
queryWords
variable by splittingparameter.Criteria
by ' ' (Space). - Nulls the
ProductLineId
,ProductLineName
andProductLineUrlSegement
fields onresult.BrandSearchResult.Brands
for the brand results that don't match anyqueryWords
to'ProductLineName'
. - Also, nulls the fields if
parameter.ProductLinesEnabled
is not true. - Using
result.BrandSearchResult.Brands
group by'Id'
and'ProductLineId'
, selects the first group and takingparameter.MaximumNumber
, then assigns it toresult.BrandSearchResult.Brands
. This removes duplicates.
RunProductFacetSearch
- InitializeSearchProperties: Uses Dependency Injection to attach
ProductSearchFacetProcessor
, andSearchGeneralSettings
, then assign them to the result object. Sets theIndexType
,SearchClient
, andSearchQueryBuilder
from the parameter to the result. - FormProductFilter: This pipe uses the
FormProductFilter
pipeline to get the product filter and assign it toresult.FormProductFilterResult
. - FormBrandStartsWithFilter: If
parameter.ProductFacetSearchParameter.BrandStartsWith
is blank, continue on to the next pipe.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the search pipelines configured for Elasticsearch version 5.5, specifically focusing on the CategoryIndexerPipeline and CategorySearchPipeline. Test your knowledge on the functionalities and properties involved in creating and customizing Elasticsearch categories and search queries.