bigcommerce / dev-docs

This repo contains the markdown files and static assets powering developer.bigcommerce.com. https://developer.bigcommerce.com/
41 stars 112 forks source link

Feedback for “Faceted and Textual Search with the GraphQL Storefront API” #2107

Closed Shmulyitz closed 8 months ago

Shmulyitz commented 9 months ago

Faceted search not pulling up products on graphql storefront api Here is my query: query paginateProducts { site { search { searchProducts( filters: {productAttributes: {attribute: "test2", values: ["test 2"]}} ) { products { collectionInfo { totalItems } pageInfo { hasNextPage startCursor } edges { node { id name sku } } } filters(first: 12) { edges { node { ...on PriceSearchFilter { name selected { minPrice maxPrice } } ... on ProductAttributeSearchFilter { displayProductCount name filterName attributes(first: 10) { edges { node { value productCount } } } } } } } } } } }

Here is my response:

{ "data": { "site": { "search": { "searchProducts": { "products": { "collectionInfo": { "totalItems": 0 }, "pageInfo": { "hasNextPage": false, "startCursor": null }, "edges": [] }, "filters": { "edges": [ { "node": { "name": "Price", "selected": { "minPrice": null, "maxPrice": null } } }, { "node": {} }, { "node": { "displayProductCount": true, "name": "Test2", "filterName": "test2", "attributes": { "edges": [ { "node": { "value": "test 2", "productCount": 1 } } ] } } } ] } } } } } } As you can see no product was returned however the product count for the attribute is one.

Why is it not pulling up the product?

bc-andreadao commented 9 months ago

@Shmulyitz The correct schema for the filters argument would be:

filters: {productAttributes: [{attribute: "test2", values: ["test 2"]}]}

instead of

filters: {productAttributes: {attribute: "test2", values: ["test 2"]}}

Shmulyitz commented 9 months ago

I just tried that and got the same results

On Wed, Nov 29, 2023 at 11:35 AM bc-andreadao @.***> wrote:

@Shmulyitz https://github.com/Shmulyitz The correct schema for the filters argument would be:

filters: {productAttributes: [{attribute: "test2", values: ["test 2"]}]}

instead of

filters: {productAttributes: {attribute: "test2", values: ["test 2"]}}

— Reply to this email directly, view it on GitHub https://github.com/bigcommerce/dev-docs/issues/2107#issuecomment-1832292558, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRRWOUVKE7MFVCF6727LITYG5P4ZAVCNFSM6AAAAAA77UM7ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZSGI4TENJVHA . You are receiving this because you were mentioned.Message ID: @.***>

robincoferbc commented 9 months ago

Hi @Shmulyitz Our search features depend on a search database that indexes records for quicker performance. Occasionally, those indexes may not sync correctly, which can result in search result discrepancies similar to this one. Please start a new support case with our support team, and we can investigate whether that is the cause of this issue. When submitting the new case, please provide any relevant store info and example product IDs that are not appearing in search results, and we can check on that for you. It also may help to reference this Github thread. Thanks!

Shmulyitz commented 9 months ago

Thank you, I will do that.

Where do I submit a support case?

On Wed, Nov 29, 2023 at 2:01 PM robincoferbc @.***> wrote:

Hi @Shmulyitz https://github.com/Shmulyitz Our search features depend on a search database that indexes records for quicker performance. Occasionally, those indexes may not sync correctly, which can result in search result discrepancies similar to this one. Please start a new support case with our support team, and we can investigate whether that is the cause of this issue. When submitting the new case, please provide any relevant store info and example product IDs that are not appearing in search results, and we can check on that for you. It also may help to reference this Github thread. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/bigcommerce/dev-docs/issues/2107#issuecomment-1832523083, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASRRWOWWHDQC2DPBRNSQVCLYG6BATAVCNFSM6AAAAAA77UM7ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZSGUZDGMBYGM . You are receiving this because you were mentioned.Message ID: @.***>

robincoferbc commented 9 months ago

@Shmulyitz You can access support options within your store's control panel in the Help section in the lower left hand corner. Alternatively, if you are a member of the partner developer program, you can submit a case within the Partner Portal, which will give you direct access to our more advanced support teams.

Shmulyitz commented 9 months ago

Thank you!

I"m just wondering can it have anything to do with the fact that this account is an Enterprise trial account?