:wave: hi! I’m working on some search enhancements...
# community-help
k
👋 hi! I’m working on some search enhancements at tradingstrategy.ai (big Typesense fans, BTW) ----->
🙌 1
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.
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:
Copy code
{
  "message": "Bad syntax for geopoint sorting field `liquidity`"
}
here’s the
sort_by
param I’m using:
Copy code
sort_by=liquidity(missing_values: first):desc,_text_match:desc
the
liquidity
field definition (based on a
GET
to the collection):
Copy code
{
  "facet": false,
  "index": true,
  "name": "liquidity",
  "optional": true,
  "type": "float"
}
Any thoughts / advice on next steps? Thanks!
j
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
k
OK, that makes sense! (I was testing locally with the
0.23.1
Docker image)
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?
j
For HA clusters there’s no downtime, but for non HA clusters there will be downtime
I’m surprised it worked with 0.23.1 locally!
k
👌 good to know (we are not HA currently)
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
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.
j
For your dataset size upgrading should take about 15-20 mins or less.
👍 1
k
What version do you recommend upgrading to? I’d like to test locally first just to make sure everything works as expected.
j
The latest RC build is 0.24.0.rcn27. I’d recommend testing against that
k
👌 thanks!
👍 1
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
j
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
k
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?
j
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.
We’ve also fixed some issues known to exist in 0.23.1…
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
k
Makes sense – thanks. Any best guess on when you’ll have
0.24.0
official release?
j
Probably in about a month
👌 1
k
Back with our cluster ID:
Copy code
<http://4relmbjhcysqztv9p-1.a1.typesense.net|4relmbjhcysqztv9p-1.a1.typesense.net>
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).
j
Just queued up an upgrade. You’ll get an email notification when it’s complete
k
Thanks! I’m not the admin on our account, but I let them know to watch for that email.
Also just ran a couple test searches and I can see that the upgrade is complete 🙌. Thanks again!
👍 1