When searching for foo I want containers that are running to be on top.
Currently, I do a custom sort after getting back the results from fuse. However, this is not super efficient because I have to receive more results than needed to do a proper sort.
But I wonder if there is a better way. I am familiar with Ellasticsearch and lucene. In those frameworks, I could do something like $query || ($query && running:true)^2) where I am essentially boosting a second query to be at top.
What's the best way to achieve this?
Here are some ideas:
Sort post search like I do now
Use logical queries, but I am not sure how that would be possible because I don't want to specify every single field.
Is there an existing issue for this?
Your question
Hello,
I think the closest issue I could find to this is https://github.com/krisk/Fuse/issues/444. So I'd like to know if I am thinking about this the right way.
I use fuse.js for Dozzle where I show Docker logs. In the UI, users are able to search containers by name. So for example, data might look like
When searching for
foo
I want containers that are running to be on top.Currently, I do a custom sort after getting back the results from fuse. However, this is not super efficient because I have to receive more results than needed to do a proper sort.
But I wonder if there is a better way. I am familiar with Ellasticsearch and lucene. In those frameworks, I could do something like
$query || ($query && running:true)^2)
where I am essentially boosting a second query to be at top.What's the best way to achieve this?
Here are some ideas:
Any recommendation would be appreciated. Thank you!