Hey <@U01PL2YSG8L>, we’re seeing an issue with wil...
# community-help
m
Hey @Kishore Nallan, we’re seeing an issue with wildcard search and overrides on 30.0.rc6, where an override is being applied incorrectly. I’ve attached a reproducible example. It seems related to the dynamic sorting override feature - we ran into something similar during its development. Happy to open a GitHub issue if needed. Thanks!
ts-wildcard-sorting.txt
k
Yes please open a GitHub issue so we can track.
We should be able to check early next week.
m
a
Noticed a commit for this fix, thanks! Do you know when a new RC will be deployed?
k
Published
30.0.rc8
that has the fix.
m
We’ll roll it out tomorrow and test/confirm. Thanks!
👍 1
We’ve tested it on RC8 and everything is working as expected 🎉
🙌 2
k
Thanks for confirming.
m
Hey @Kishore Nallan, we think we’ve run into another overrides issue related to dynamic sorting that’s blocking us from using it in production. Could you please confirm if this is a bug, and if so, whether it can be fixed in the upcoming RCs? Thanks 🙏 https://github.com/typesense/typesense/issues/2489
k
Will check
There is a problem with the override rule here. The placeholder
{ }
can be used only in the outside
filter_by
action and not inside
rule.filter_by
. See: https://typesense.org/docs/29.0/api/curation.html#dynamic-filtering We have not implemented placeholder capturing for the
rule.filter_by
yet, like it works for
rule.query_by
now. Right now, the placeholder support for filter_by is just a way to capture terms from the query and to replace those in the filter_by action. For e.g. if query contains a brand, then use that brand in filter_by clause.
m
@Kishore Nallan we’re actually using the new dynamic sorting feature with the
{}
placeholder inside
rule.filter_by
, and it generally works fine. The issue is that overrides with only a partial
filter_by
match are also getting triggered unexpectedly. https://typesense.org/docs/29.0/api/curation.html#dynamic-sorting
Copy code
{
  "rule": {
    "filter_by": "store:={store}",
    "match": "exact"
  },
  "remove_matched_tokens": true,
  "sort_by": "sales.{store}:desc, inventory.{store}:desc"
}
k
In any case, we will be looking into this in more detail next week. Will keep you posted.
🙌 2
m
@Kishore Nallan looks like there’s another similar issue with standard (non-dynamic) overrides in rc8: https://github.com/typesense/typesense/issues/2506
k
Ok we will check.
👌 1
Fixes for both published in
30.0.rc9
-- please verify, Hopefully no more issues on this.
m
Thank you! We’ll test it out and report back
@Kishore Nallan confirming - all these issues are resolved in rc9. We’re now running this version on both dev and prod, monitoring closely. Thanks again for the quick updates!
k
Thank you to you too for flagging these!
🙌 1
a
FYI we had a crash today of this build, will DM the stack trace 🙂
👍 1
k
There's a query logged during the crash. Are you able to retry that query to see if it produces the crash again?
a
@Max Priazhevskii I can send this to you
👍 1
k
That query already exists in the stack trace you DMed. What I wish to know is whether that query, if run again, crashes again.
👌 1
m
This and similar queries are user-facing
multi_search
calls that are heavily used on the FE. We tried to reconstruct the query from the stack trace and run it with curl, but it didn’t produce any errors. Is there a way to run this query against the server exactly as it’s logged?
Copy code
qs=?collection=[...]&conversation_stream=&facet_by=[...]&facet_query=&facet_strategy=exhaustive&filter_by=[...]&highlight_fields=none&include_fields=[...]&limit=24&max_facet_values=100&override_tags=[...]&page=17&q=*&sort_by=[...]&use_cache=true&, body={"searches":[{"filter_by":"[...]","limit":24,"include_fields":"[...]","page":17,"sort_by":"[...]","facet_by":"[...]","max_facet_values":100}]}
k
Just try with the
body
-- that should capture the full query.
m
yep, we’ve tried that - but the body is missing a few required params (collection and q). When we add them, the query runs without errors.
k
Do you know the override that matches this query?
m
Yes, actually we were in the middle of updating a bunch of overrides with a dynamic {region} placeholder for filter_by to match the FE query. The current override looks like this:
Copy code
{
  "excludes": [
    {
      "id": "930a7ad5801b6e103aec6ffb331b2a2f"
    },
    {
      "id": "65b23633fb6cba83a88abc6778aa5f95"
    }
  ],
  "filter_curated_hits": false,
  "id": "66e240d609cee",
  "includes": [],
  "metadata": {
    "categoryid": 6,
    "regions": [],
    "searchandising": true,
    "type": "category"
  },
  "remove_matched_tokens": false,
  "rule": {
    "filter_by": "region:={region} && ([the filter_by from the trace])",
    "tags": [
      "sort:relevance"
    ]
  },
  "sort_by": "bestseller1day:desc,newest:desc,availability:desc",
  "stop_processing": true
}
Both the query and the override (and similar ones) are currently enabled in production, with no issues since that one crash.
Actually, no - our crash alerts go into a thread... We’ve had a couple more just now. @Alain Russell will share the traces once he’s back online.
k
Ok hopefully we can reproduce one of these.
👌 1
a
Have DM’d you ~5 stack traces. We’ve had quite a few crashes but each trace looks like it’s the same path
k
Ok I think I know what's happening. I will try to get you a new build by Monday.
🙌 2
m
Hey @Kishore Nallan we’ve noticed the rc10 build has a dynamic override filter tweak. Should we try it to see if it stops the crashes?
k
Yes, please try that out.
👌 1
a
We’ve deployed this to dev & prod environments, will let you know how it looks tomorrow - thanks for the quick action 🙂
🙌 1
Confirming we’ve had no crashes since this version deployed 🎉
And still the case, looking stable now 🙂
🙌 1