#community-help

Upgrading Typesense to Solve Syntax Error

TLDR Ken encountered an issue with Typesense search enhancements on their site and Jason suggested an upgrade. They also discussed the possible downtime and finalized the process.

Powered by Struct AI

3

1

1

1

Nov 02, 2022 (14 months ago)
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
06:47 PM
👋 hi! I’m working on some search enhancements at tradingstrategy.ai (big Typesense fans, BTW) ----->

1

06:47
Ken
06:47 PM
In particular, I want to prioritize results with a null value for our liquidity field. I was happy to find the missing_values sort option that seems to address our need.
06:47
Ken
06:47 PM
Testing this against a local Typesense instance works as expected. However, when I include this in a search query against our hosted production Typesense instance, I’m getting a strange error message:
{
  "message": "Bad syntax for geopoint sorting field `liquidity`"
}
06:48
Ken
06:48 PM
here’s the sort_by param I’m using:
sort_by=liquidity(missing_values: first):desc,_text_match:desc
06:48
Ken
06:48 PM
the liquidity field definition (based on a GET to the collection):
{
  "facet": false,
  "index": true,
  "name": "liquidity",
  "optional": true,
  "type": "float"
}
06:49
Ken
06:49 PM
Any thoughts / advice on next steps? Thanks!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:50 PM
We added this feature in the latest RC build of Typesense. So you’d probably need to upgrade your TS Cloud cluster. Happy to queue up an upgrade if you can share your cluster ID with me
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
06:51 PM
OK, that makes sense! (I was testing locally with the 0.23.1 Docker image)
06:51
Ken
06:51 PM
Let me check on the cluster ID and get back to you. Is there any downtime for the upgrade / anything else we should be aware of?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:53 PM
For HA clusters there’s no downtime, but for non HA clusters there will be downtime
06:53
Jason
06:53 PM
I’m surprised it worked with 0.23.1 locally!
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
06:53 PM
👌 good to know (we are not HA currently)
06:59
Ken
06:59 PM
I just tested it again against 0.23.1 to make sure I wasn’t imagining things – works exactly as described in the docs!

1

07:03
Ken
07:03 PM
Any estimate on how long the downtime will be? We have a single collection of approx. 250k records. We use a regular batch process to upsert the data, so it’s also not hard for us to recreate the collection from scratch if that’s quicker or easier. Knowing about how long will just help us schedule the this appropriately.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:04 PM
For your dataset size upgrading should take about 15-20 mins or less.

1

Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
07:05 PM
What version do you recommend upgrading to? I’d like to test locally first just to make sure everything works as expected.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:06 PM
The latest RC build is 0.24.0.rcn27. I’d recommend testing against that
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
07:07 PM
👌 thanks!

1

07:36
Ken
07:36 PM
FYI, the docs show this feature was added in 0.23.0. Was there a change to this feature in the latest RC we should be aware of?
https://typesense.org/docs/0.23.0/api/search.html#sorting-null-empty-or-missing-values
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:39 PM
Hmm, the docs are right if you see it there. I most likely misremembered when we added it, especially if it was towards the end of the release cycle for v0.23
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
07:40 PM
Gotcha. Do you recommend still upgrading to the latest RC vs. 0.23.1? Any major risks / downsides vs. going with the official, stable release?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:46 PM
We’re already in code freeze for v0.24, so all known issues are fixed and we’re in observation period to see if any other issues crop up. So far it’s been pretty stable. So if you anyway need to upgrade, you might as well take the opportunity to go to 0.24.
07:47
Jason
07:47 PM
We’ve also fixed some issues known to exist in 0.23.1…
07:48
Jason
07:48 PM
But as usual, the risk is unknown unknowns, of lurking issues. But we tend to fix issues with RC builds quickly. Worst case, you can always rollback
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
07:51 PM
Makes sense – thanks. Any best guess on when you’ll have 0.24.0 official release?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:56 PM
Probably in about a month

1

Nov 03, 2022 (14 months ago)
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
02:34 PM
Back with our cluster ID:
02:35
Ken
02:35 PM
I’ve tested on the latest RC – everything looks good 👍. We are fine with the upgrade proceeding anytime – our search feature is not currently a critical system (OK to experience downtime during biz hours).
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:01 PM
Just queued up an upgrade. You’ll get an email notification when it’s complete
Ken
Photo of md5-e647a31295419f1362630a69cf274ae3
Ken
06:43 PM
Thanks! I’m not the admin on our account, but I let them know to watch for that email.
06:44
Ken
06:44 PM
Also just ran a couple test searches and I can see that the upgrade is complete 🙌. Thanks again!

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Typesense Bug Fix with `canceled_at` Field and Upgrade Concerns

Mateo reported an issue regarding the treatment of an optional field by Typesense which was confirmed a bug by Jason. After trying an upgrade, an error arose. Jason explained the bug was due to a recent change and proceeded to downgrade their version. Future upgrade protocols were discussed.

3

74
10mo

Typesense Server Crash and Counting Issue

Dan reported a server crash and counting issues with Typesense server version 0.26.0.rc1. Jason suggested an upgrade to `0.26.0.rc13` while Kishore Nallan committed to investigate the issue based on a sample dataset from Dan.

11
3mo

Troubleshooting 400 Error When Upgrading Typesense Firestore Extension

Orion experienced a `400` error after updating the Typesense Firestore extension, causing issues with cloud functions. They traced the issue back to a data type conflict in their Typesense collection schema after updating. With help from Jason and Kishore Nallan, they resolved the issue by recreating the collection.

5

96
14mo

Resolving Issues with Infix and Prefix in Query Searches

Daren struggled with searches missing values in production. Jason and Kishore Nallan offered insights and created new features to help solve the problem, which was then tested and deployed by Daren.

2

38
5mo

Resolving 'Sort by String Property' Error in Typesense

Ahmad was unable to sort by a string property on Typesense. Jason helped diagnose the issue, instructed the user to upgrade from their side, and enabled the sorting feature in the user's schema.

2

16
24mo