Search	search pipelines
40 Questions
6 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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?

  • 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?

  • 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?

    <p>When parameter.PropertyDefinition.IsCustomProperty is true</p> Signup and view all the answers

    What does the InitializeSearchProperties operation retrieve?

    <p>Search indices and properties</p> Signup and view all the answers

    Which version of Elasticsearch should be referred to for updated search pipelines?

    <p>7.10</p> Signup and view all the answers

    What action is performed by the RunCategorySearch operation?

    <p>Retrieves search-related properties</p> Signup and view all the answers

    What does the term 'IndexableCategories' refer to in the context of the search pipeline?

    <p>Categories that are eligible for search indexing</p> Signup and view all the answers

    What is the purpose of using the result.DisallowedCategories List in the cache key?

    <p>To filter out specific categories from the search results</p> Signup and view all the answers

    Which filter is applied to restrict search results to a specific language?

    <p>FormLanguageFilter</p> Signup and view all the answers

    What will happen if result.SiteContext.WebsiteDto is null?

    <p>It will lead to a Pipeline Exception/Error</p> Signup and view all the answers

    How does the Parameter.AddTypeFilter function in the search process?

    <p>It adds a type filter for 'category'</p> Signup and view all the answers

    What does the CombineFilters operation do with result.AllFilters?

    <p>It combines them into a single SearchQuery with 'And'</p> Signup and view all the answers

    When creating a MultiMatchQuery search type, what is the source of the query?

    <p>result.CategorySearchFields</p> Signup and view all the answers

    What is the purpose of the FunctionScoreQuery in the search process?

    <p>To attach a Score Function for the Boost Field</p> Signup and view all the answers

    What type of query does FormFuzzySearch create in the search process?

    <p>MultiMatchFuzzyQuery</p> Signup and view all the answers

    What is the first action taken if 'result.SearchResponse.Aggregations' does not contain 'PerformSearch.ContentAggregationKey'?

    <p>Continue to the next pipe</p> Signup and view all the answers

    What happens to 'result.ContentSearchResults' if it is found to be empty?

    <p>The next pipe is executed</p> Signup and view all the answers

    Which key is used to create new instances of 'ContentSearchResultDto'?

    <p>parameter.SearchContentMapper.ToContentSearchResultDto</p> Signup and view all the answers

    What is selected from 'result.SearchResponse' after checking 'result.SearchResponse.Aggregations'?

    <p>result.SearchResponse.Hits</p> Signup and view all the answers

    If 'PerformSearch.TopHitsAggregationKey' does not yield a result, what is the next probable step?

    <p>Continue to the next pipe</p> Signup and view all the answers

    Which of the following occurs when 'result.SearchResponse.Hits' is not null?

    <p>It creates new instances of 'ContentSearchResultDto'</p> Signup and view all the answers

    What does 'result.SearchResponse.Aggregations' hold in the context of processing?

    <p>Aggregated search metrics</p> Signup and view all the answers

    Which variable is assigned the collection of new 'ContentSearchResultDto' after processing?

    <p>result.ContentSearchResults</p> Signup and view all the answers

    What is the purpose of combining individual FieldQueries into a BooleanQuery using Operation.Or?

    <p>To include products that match any of the specified criteria.</p> Signup and view all the answers

    Which of the following conditions will cause the query to skip to the next pipe?

    <p>If parameter.ProductSearchParameter.ProductNames is null or empty.</p> Signup and view all the answers

    What does the result.ProductIdFilter contain after combining FieldQueries?

    <p>It holds the IDs of products filtered based on ID criteria.</p> Signup and view all the answers

    What happens if result.AllFilters is empty?

    <p>result.CombinedFilter will be assigned null.</p> Signup and view all the answers

    How are filters from parameter.ProductSearchParameter.ProductErpNumbers processed?

    <p>They are combined into a BooleanQuery using Operation.Or.</p> Signup and view all the answers

    What role does the IPerRequestCacheManager play in the filtering process?

    <p>It retrieves the restriction group filter based on context IDs.</p> Signup and view all the answers

    Which operation is used to combine all filters in result.AllFilters into one?

    <p>Operation.And</p> Signup and view all the answers

    What is the result of executing a FieldQuery against the ISearchProductObject.Name field?

    <p>It restricts results to those that match given product names.</p> Signup and view all the answers

    What should be done if 'ProductLinesEnabled' is true and there are brands with non-empty 'ProductLineName'?

    <p>Order brands using OrderByDescending by 'Score'.</p> Signup and view all the answers

    What happens if 'parameter.Criteria' is null?

    <p>The processing continues without filtering results.</p> Signup and view all the answers

    What is the purpose of creating the variable 'queryWords'?

    <p>To split 'parameter.Criteria' by spaces for further processing.</p> Signup and view all the answers

    What should be done to brands that do not match any 'queryWords'?

    <p>Null the 'ProductLineName', 'ProductLineId', and 'ProductLineUrlSegment' fields.</p> Signup and view all the answers

    What is the outcome of grouping 'result.BrandSearchResult.Brands' by 'Id' and 'ProductLineId'?

    <p>It selects the first group and limits to 'parameter.MaximumNumber'.</p> Signup and view all the answers

    What is the function of the ProductSearchPipeline's FormProductFilter pipeline?

    <p>To assign the product filter results to the result object.</p> Signup and view all the answers

    What condition leads to skipping to the next processing pipe without taking action?

    <p>If 'parameter.ProductFacetSearchParameter.BrandStartsWith' is blank.</p> Signup and view all the answers

    What does the initialization process with Dependency Injection attach to the result object?

    <p>Multiple processors and settings related to product searching.</p> Signup and view all the answers

    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 the parameter.SearchBoost.IsQueryable and parameter.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 the FormCategoryExcludeList 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. If result.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 to result.CombinedFilter. If no filters are found, result.CombinedFilter will be set to null.
    • 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 to result.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 contain PerformSearch.ContentAggregationKey, continues to the next pipe. Selects from PerformSearch.ContentAggregationKey Items, any PerformSearch.TopHitsAggregationKey using the parameter.SearchContentMapper.ToContentSearchResultDto to create new ContentSearchResultDto, and assigns the resulting collection to result.ContentSearchResults.
    • ProcessSearchResponseForAllAggregations: If the result.SearchResponse.Aggregations does not contain PerformSearch.ContentAggregationKey, continues to the next pipe. Selects from result.SearchResponse.Aggregations all PerformSearch.TopHitsAggregationKey using the parameter.SearchContentMapper.ToContentSearchResultDto to create new ContentSearchResultDto, and assigns the resulting collection to result.ContentSearchResults.
    • ProcessSearchResponseFromResult: If result.ContentSearchResults is empty, continues to the next pipe. Selects from result.SearchResponse.Hits all not null using the parameter.SearchContentMapper.ToContentSearchResultDto to create new ContentSearchResultDto, and assigns the resulting collection to result.ContentSearchResults.

    FormProductIdFilter

    • Makes a FieldQuery for each product in parameter.ProductSearchParameter.ProductIds against the ISearchProductObject.ProductId field, combines them into a BooleanQuery using the Operation.Or, assigns it to result.ProductIdFilter, and adds result.ProductIdFilter to result.AllFilters.
    • If parameter.ProductSearchParameter.ProductNames is null or empty, continues to the next pipe.

    FormProductNameFilter

    • Makes a FieldQuery for each product in parameter.ProductSearchParameter.ProductNames against the ISearchProductObject.Name field, combines them into a BooleanQuery using the Operation.Or, assigns it to result.ProductNameFilter, and adds result.ProductNameFilter to result.AllFilters.
    • If parameter.ProductSearchParameter.ProductErpNumbers is null or empty, continues to the next pipe.

    FormProductErpNumberFilter

    • Makes a FieldQuery for each product in parameter.ProductSearchParameter.ProductErpNumbers against the ISearchProductObject.ErpNumberSort field, combines them into a BooleanQuery using the Operation.Or, assigns it to result.ProductErpNumberFilter, and adds result.ProductErpNumberFilter to result.AllFilters.

    CombineFilters

    • Makes a BoolQuery with the Operation.And of all filters in result.AllFilters and assigns it to result.CombinedFilter or null if filters are empty.

    GetRestrictionGroupFilter

    • Attempts to retrieve the Restriction Group filter from the IPerRequestCacheManager cache based on parameter.SiteContext.BillTo.Id and parameter.SiteContext.ShipTo.Id, and assigns it to result.RestrictionGroupFilter.
    • If parameter.ProductLinesEnabled is true and has result.BrandSearchResult.Brands that do not have a blank 'ProductLineName', orders result.BrandSearchResult.Brands using OrderByDescending by 'Score'.
    • If the prior checks pass, fall back to sorting by Score for the parameter.MaximumNumber. Then set brand results to result.BrandSearchResult.Brands.
    • If parameter.Criteria is null, result.BrandSearchResult?.Brands is null, or result.BrandSearchResult.Brands all ProductLineNames are empty, continue on to the next pipe.

    ProcessProductLines

    • Creates a queryWords variable by splitting parameter.Criteria by ' ' (Space).
    • Nulls the ProductLineId, ProductLineName and ProductLineUrlSegement fields on result.BrandSearchResult.Brands for the brand results that don't match any queryWords 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 taking parameter.MaximumNumber, then assigns it to result.BrandSearchResult.Brands. This removes duplicates.

    RunProductFacetSearch

    • InitializeSearchProperties: Uses Dependency Injection to attach ProductSearchFacetProcessor, and SearchGeneralSettings, then assign them to the result object. Sets the IndexType, SearchClient, and SearchQueryBuilder from the parameter to the result.
    • FormProductFilter: This pipe uses the FormProductFilter pipeline to get the product filter and assign it to result.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.

    Quiz Team

    Related Documents

    Search - search pipelines.pdf

    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.

    More Like This

    Splunk
    3 questions

    Splunk

    LuminousSage avatar
    LuminousSage
    Elasticsearch Reindexing Basics
    10 questions
    Search	search helper classes
    21 questions

    Search search helper classes

    SupportedAstatine4145 avatar
    SupportedAstatine4145
    Use Quizgecko on...
    Browser
    Browser