Skip to content

MSRCH-5448: Document numeric facet StatsBucket + RangeBucket - #593

Merged
meker12 merged 4 commits into
mainfrom
MSRCH-5448-document-numeric-facet-bucket-behavior
Jul 30, 2026
Merged

MSRCH-5448: Document numeric facet StatsBucket + RangeBucket#593
meker12 merged 4 commits into
mainfrom
MSRCH-5448-document-numeric-facet-bucket-behavior

Conversation

@meker12

@meker12 meker12 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Purpose of this pull request

  • Documents that the dynamic facet buckets array is polymorphic: numeric attributes can return both a RangeBucket and a StatsBucket, and callers should use StatsBucket.min/StatsBucket.max (not RangeBucket.from/to) to get the actual min/max of the filtered result set, since the range bucket can reflect configured/slider bounds instead.

Corrects the LS API reference based on validation against the actual GraphQL schema (MSRCH-5448):

  • Marks context (and its nested customerGroup field) as optional rather than required, and clarifies that requests without it default to the Not Logged In customer group.
  • Notes that StatsBucket.title can be an empty string.
  • Fixes small example/schema inaccuracies: categoryPath filter takes a single string (not an array) for eq, and corrects spacing in the filter code sample.

MSRCH-5448

Affected pages

whatsnew
Updated the productSearch query documentation to clarify that when a numeric facet returns both a RangeBucket and a StatsBucket, use StatsBucket.min/max for the true result-set bounds, since RangeBucket.from/to may reflect configured slider limits instead.

behavior for MSRCH-5448
- Small updates to productSearch query API
reference based on code validation
@meker12 meker12 added the technical Changes to code, examples, or technical processes label Jul 28, 2026
@meker12 meker12 self-assigned this Jul 28, 2026
@github-project-automation github-project-automation Bot moved this to 📋 Needs Review in Commerce - Pull Requests Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Linter Report

Click to expand full report
═══════════════════════════════════════════════════════════════
                     LINTER REPORT
═══════════════════════════════════════════════════════════════

Generated: 2026-07-28T16:43:54.384Z
Mode: Full Linting (all rules + dead links check)
Target Directory: /home/runner/work/commerce-webapi/commerce-webapi
Skipped Rules:
  - check-frontmatter → src/pages/includes
  - missing-heading → src/pages/includes

───────────────────────────────────────────────────────────────

Files to process: 1


═══════════════════════════════════════════════════════════════
                        SUMMARY
═══════════════════════════════════════════════════════════════

  📁 Files processed:    1
  📄 Files with issues:  0
  ❌ Total errors:       0
  ⚠️  Total warnings:     0
  📋 Total issues:       0

Result: ✅ PASSED - All files passed linting successfully!

═══════════════════════════════════════════════════════════════

This comment was automatically generated by the linter bot.

@github-project-automation github-project-automation Bot moved this from 📋 Needs Review to 👍 Approved in Commerce - Pull Requests Jul 28, 2026
Comment thread src/pages/graphql/schema/live-search/queries/product-search.md Outdated
Comment thread src/pages/graphql/schema/live-search/queries/product-search.md Outdated
Co-authored-by: Jared Hoover <98363870+jhadobe@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Linter Report

Click to expand full report
═══════════════════════════════════════════════════════════════
                     LINTER REPORT
═══════════════════════════════════════════════════════════════

Generated: 2026-07-28T17:55:35.016Z
Mode: Full Linting (all rules + dead links check)
Target Directory: /home/runner/work/commerce-webapi/commerce-webapi
Skipped Rules:
  - check-frontmatter → src/pages/includes
  - missing-heading → src/pages/includes

───────────────────────────────────────────────────────────────

Files to process: 1


═══════════════════════════════════════════════════════════════
                        SUMMARY
═══════════════════════════════════════════════════════════════

  📁 Files processed:    1
  📄 Files with issues:  0
  ❌ Total errors:       0
  ⚠️  Total warnings:     0
  📋 Total issues:       0

Result: ✅ PASSED - All files passed linting successfully!

═══════════════════════════════════════════════════════════════

This comment was automatically generated by the linter bot.


- `phrase` - The string of text to search for. This field is required but an empty string may be used if only filtering by `category` or `categoryPath`.
- `context` - (Live Search only) Query context that allows customized search results to be returned based on the customer group passed. This is used to get the view history of a SKU.
- `context` - (Live Search only) Optional query context that allows customized search results to be returned based on the customer group or shopper view history passed. If no context is provided, the request uses the Not Logged In customer group.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is AI interpretation of code comments:

input QueryContextInput {
    # The customer group code. Field reserved for future use.
    # Currently, passing this field will have no impact on search results, that is, the search
    # results will be for "Not logged in" customer
    customerGroup: String!
    # User view history with timestamp
    userViewHistory: [ViewHistoryInput!]
}

Need dev validation -- should this field be included in the schema? customerGroup is also marked as required field.

Clarification:

Is the context field used? Should it be included in the documentation?

customerGroup data type is String! (A value has to be supplied?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted this change to publish the updates. Opened a ticket to follow up on correctness of context description. (MSRCH-5633)

@meker12 meker12 changed the title - Document numeric facet StatsBucket + RangeBucket MSRCH-5448: Document numeric facet StatsBucket + RangeBucket Jul 28, 2026
Comment thread src/pages/graphql/schema/live-search/queries/product-search.md Outdated
Comment thread src/pages/graphql/schema/live-search/queries/product-search.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Linter Report

Click to expand full report
═══════════════════════════════════════════════════════════════
                     LINTER REPORT
═══════════════════════════════════════════════════════════════

Generated: 2026-07-30T14:45:40.771Z
Mode: Full Linting (all rules + dead links check)
Target Directory: /home/runner/work/commerce-webapi/commerce-webapi
Skipped Rules:
  - check-frontmatter → src/pages/includes
  - missing-heading → src/pages/includes

───────────────────────────────────────────────────────────────

Files to process: 1


═══════════════════════════════════════════════════════════════
                        SUMMARY
═══════════════════════════════════════════════════════════════

  📁 Files processed:    1
  📄 Files with issues:  0
  ❌ Total errors:       0
  ⚠️  Total warnings:     0
  📋 Total issues:       0

Result: ✅ PASSED - All files passed linting successfully!

═══════════════════════════════════════════════════════════════

This comment was automatically generated by the linter bot.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Linter Report

Click to expand full report
═══════════════════════════════════════════════════════════════
                     LINTER REPORT
═══════════════════════════════════════════════════════════════

Generated: 2026-07-30T14:46:46.049Z
Mode: Full Linting (all rules + dead links check)
Target Directory: /home/runner/work/commerce-webapi/commerce-webapi
Skipped Rules:
  - check-frontmatter → src/pages/includes
  - missing-heading → src/pages/includes

───────────────────────────────────────────────────────────────

Files to process: 1


═══════════════════════════════════════════════════════════════
                        SUMMARY
═══════════════════════════════════════════════════════════════

  📁 Files processed:    1
  📄 Files with issues:  0
  ❌ Total errors:       0
  ⚠️  Total warnings:     0
  📋 Total issues:       0

Result: ✅ PASSED - All files passed linting successfully!

═══════════════════════════════════════════════════════════════

This comment was automatically generated by the linter bot.

@meker12
meker12 merged commit 5be1bca into main Jul 30, 2026
28 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Approved to 🏁 Done in Commerce - Pull Requests Jul 30, 2026
@meker12
meker12 deleted the MSRCH-5448-document-numeric-facet-bucket-behavior branch July 30, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Changes to code, examples, or technical processes

Projects

Status: 🏁 Done

Development

Successfully merging this pull request may close these issues.

4 participants