A customer reported not getting results by section in PCH Related Posts.
Digging deeper, we found that the customer's metadata is registering sections with the category's slug, not the name field which we currently use to fetch results.
Describe the solution you'd like
There are a few possible solutions:
If possible, query with both name and slug in one call, and show the results. There's a slight possibility of getting some unwanted results.
Perform the name query as usual, and if no results are returned then query for slug. There's a slighter chance of showing unwanted results, but we use 2 calls and latency increases for results by slug and when there are no results at all.
Provide a setting so customers can set whether the query should be made by name or slug. We could also introduce an option to query both if we think it could be useful, especially if it's possible with one call. This solution eliminates the possibility of showing potentially unwanted results, but it's considerably more work for something that isn't currently a widespread need.
Is your feature request related to a problem?
A customer reported not getting results by section in PCH Related Posts.
Digging deeper, we found that the customer's metadata is registering sections with the category's
slug
, not thename
field which we currently use to fetch results.Describe the solution you'd like
There are a few possible solutions:
name
andslug
in one call, and show the results. There's a slight possibility of getting some unwanted results.name
query as usual, and if no results are returned then query forslug
. There's a slighter chance of showing unwanted results, but we use 2 calls and latency increases for results byslug
and when there are no results at all.name
orslug
. We could also introduce an option to query both if we think it could be useful, especially if it's possible with one call. This solution eliminates the possibility of showing potentially unwanted results, but it's considerably more work for something that isn't currently a widespread need.