-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort with string #1680
Comments
Hello @sanders41! We are aware of this problem, I should have open an issue on MeiliSearch side, my bad. See the related issue meilisearch/milli#333 We have to release Milli and integrate into this repo and this might fix this bug 🙂 |
Fixed by #1686 |
With v0.22.0rc1 The issue is still there, but it is different now. Now the results are always returning in the same order and ignoring the sort. If I search for |
@sanders41 That's quite strange, as we directly tested the @shekhirin PR with the movies dataset on MeiliSearch and it was working fine.
|
@Kerollmops I'm using the small movies dataset. I'll detail the full steps here, maybe I have something wrong.
curl -H 'X-MEILI-API-KEY: masterKey' -X POST 'http://localhost:7700/indexes/movies/settings/sortable-attributes' --data '["title"]'
$ curl -H 'X-MEILI-API-KEY: masterKey' -X GET 'http://localhost:7700/indexes/movies/settings'
{"displayedAttributes":["*"],"searchableAttributes":["*"],"filterableAttributes":[],"sortableAttributes":["title"],"rankingRules":["words","typo","proximity","attribute","sort","exactness"],"stopWords":[],"synonyms":{},"distinctAttribute":null}
[2021-09-08T19:05:21Z INFO meilisearch_http::index::updates] document addition done: DocumentAdditionResult { nb_documents: 30 }
curl -H 'X-MEILI-API-KEY: masterKey' -X POST 'http://localhost:7700/indexes/movies/search' --data '{"q": "world"}' | jq {
"hits": [
{
"id": "166428",
"title": "How to Train Your Dragon: The Hidden World",
"poster": "https://image.tmdb.org/t/p/w1280/xvx4Yhf0DVH8G4LzNISpMfFBDy2.jpg",
"overview": "As Hiccup fulfills his dream of creating a peaceful dragon utopia, Toothless’ discovery of an untamed, elusive mate draws the Night Fury away. When danger mounts at home and Hiccup’s reign as village chief is tested, both dragon and rider must make impossible decisions to save their kind.",
"release_date": 1546473600,
"genre": "cartoon"
},
{
"id": "543103",
"title": "Kamen Rider Heisei Generations FOREVER",
"poster": "https://image.tmdb.org/t/p/w1280/6sOFQDlkY6El1B2P5gklzJfVdsT.jpg",
"overview": "In the world of Sougo Tokiwa and Sento Kiryu, their 'companions' are losing their memories one after the other as they're replaced by other people. The Super Time Jacker, Tid , appears before them. He orders his powerful underlings, Another Double and Another Den-O, to pursue a young boy called Shingo. While fighting to protect Shingo, Sougo meets Ataru, a young man who loves Riders, but Ataru says that Kamen Riders aren't real. What is the meaning of those words? While the mystery deepens, the true enemy that Sougo and Sento must defeat appears in the Kuriogatake mountain...",
"release_date": 1545436800
},
{
"id": "454294",
"title": "The Kid Who Would Be King",
"poster": "https://image.tmdb.org/t/p/w1280/kBuvLX6zynQP0sjyqbXV4jNaZ4E.jpg",
"overview": "Old-school magic meets the modern world when young Alex stumbles upon the mythical sword Excalibur. He soon unites his friends and enemies, and they become knights who join forces with the legendary wizard Merlin. Together, they must save mankind from the wicked enchantress Morgana and her army of supernatural warriors.",
"release_date": 1547596800
},
{
"id": "299536",
"title": "Avengers: Infinity War",
"poster": "https://image.tmdb.org/t/p/w1280/7WsyChQLEftFiDOVTGkv3hFpyyt.jpg",
"overview": "As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows: Thanos. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment - the fate of Earth and existence itself has never been more uncertain.",
"release_date": 1524618000,
"genre": "action"
},
{
"id": "399579",
"title": "Alita: Battle Angel",
"poster": "https://image.tmdb.org/t/p/w1280/xRWht48C2V8XNfzvPehyClOvDni.jpg",
"overview": "When Alita awakens with no memory of who she is in a future world she does not recognize, she is taken in by Ido, a compassionate doctor who realizes that somewhere in this abandoned cyborg shell is the heart and soul of a young woman with an extraordinary past.",
"release_date": 1548892800
},
{
"id": "404368",
"title": "Ralph Breaks the Internet",
"poster": "https://image.tmdb.org/t/p/w1280/lvfIaThG5HA8THf76nghKinjjji.jpg",
"overview": "Video game bad guy Ralph and fellow misfit Vanellope von Schweetz must risk it all by traveling to the World Wide Web in search of a replacement part to save Vanellope's video game, 'Sugar Rush.' In way over their heads, Ralph and Vanellope rely on the citizens of the internet -- the netizens -- to help navigate their way, including an entrepreneur named Yesss, who is the head algorithm and the heart and soul of trend-making site BuzzzTube.",
"release_date": 1542672000
},
{
"id": "456740",
"title": "Hellboy",
"poster": "https://image.tmdb.org/t/p/w1280/nUXCJMnAiwCpNPZuJH2n6h5hGtF.jpg",
"overview": "Hellboy comes to England, where he must defeat Nimue, Merlin's consort and the Blood Queen. But their battle will bring about the end of the world, a fate he desperately tries to turn away.",
"release_date": 1554944400
},
{
"id": "424783",
"title": "Bumblebee",
"poster": "https://image.tmdb.org/t/p/w1280/fw02ONlDhrYjTSZV8XO6hhU3ds3.jpg",
"overview": "On the run in the year 1987, Bumblebee finds refuge in a junkyard in a small Californian beach town. Charlie, on the cusp of turning 18 and trying to find her place in the world, discovers Bumblebee, battle-scarred and broken. When Charlie revives him, she quickly learns this is no ordinary yellow VW bug.",
"release_date": 1544832000
},
{
"id": "297802",
"title": "Aquaman",
"poster": "https://image.tmdb.org/t/p/w1280/5Kg76ldv7VxeX9YlcQXiowHgdX6.jpg",
"overview": "Once home to the most advanced civilization on Earth, Atlantis is now an underwater kingdom ruled by the power-hungry King Orm. With a vast army at his disposal, Orm plans to conquer the remaining oceanic people and then the surface world. Standing in his way is Arthur Curry, Orm's half-human, half-Atlantean brother and true heir to the throne.",
"release_date": 1544140800,
"genre": "action"
},
{
"id": "485811",
"title": "Redcon-1",
"poster": "https://image.tmdb.org/t/p/w1280/vVPrWngVJ2cfYAncBedQty69Dlf.jpg",
"overview": "After a zombie apocalypse spreads from a London prison, the UK is brought to its knees. The spread of the virus is temporarily contained but, without a cure, it’s only a matter of time before it breaks its boundaries and the biggest problem of all… any zombies with combat skills are now enhanced. With the South East of England quarantined from the rest of the world using fortified borders, intelligence finds that the scientist responsible for the outbreak is alive and well in London. With his recovery being the only hope of a cure, a squad of eight Special Forces soldiers is sent on a suicide mission to the city, now ruled by the undead, with a single task: get him out alive within 72 hours by any means necessary. What emerges is an unlikely pairing on a course to save humanity against ever-rising odds.",
"release_date": 1538096400
},
{
"id": "338952",
"title": "Fantastic Beasts: The Crimes of Grindelwald",
"poster": "https://image.tmdb.org/t/p/w1280/fMMrl8fD9gRCFJvsx0SuFwkEOop.jpg",
"overview": "Gellert Grindelwald has escaped imprisonment and has begun gathering followers to his cause—elevating wizards above all non-magical beings. The only one capable of putting a stop to him is the wizard he once called his closest friend, Albus Dumbledore. However, Dumbledore will need to seek help from the wizard who had thwarted Grindelwald once before, his former student Newt Scamander, who agrees to help, unaware of the dangers that lie ahead. Lines are drawn as love and loyalty are tested, even among the truest friends and family, in an increasingly divided wizarding world.",
"release_date": 1542153600,
"genre": "fantasy"
},
{
"id": "287947",
"title": "Shazam!",
"poster": "https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg",
"overview": "A boy is given the ability to become an adult superhero in times of need with a single magic word.",
"release_date": 1553299200,
"genre": "action"
}
],
"nbHits": 12,
"exhaustiveNbHits": false,
"query": "world",
"limit": 20,
"offset": 0,
"processingTimeMs": 2
}
curl -H 'X-MEILI-API-KEY: masterKey' -X POST 'http://localhost:7700/indexes/movies/search' --data '{"q": "world", "sort": ["title:asc"]}' | jq {
"hits": [
{
"id": "166428",
"title": "How to Train Your Dragon: The Hidden World",
"poster": "https://image.tmdb.org/t/p/w1280/xvx4Yhf0DVH8G4LzNISpMfFBDy2.jpg",
"overview": "As Hiccup fulfills his dream of creating a peaceful dragon utopia, Toothless’ discovery of an untamed, elusive mate draws the Night Fury away. When danger mounts at home and Hiccup’s reign as village chief is tested, both dragon and rider must make impossible decisions to save their kind.",
"release_date": 1546473600,
"genre": "cartoon"
},
{
"id": "543103",
"title": "Kamen Rider Heisei Generations FOREVER",
"poster": "https://image.tmdb.org/t/p/w1280/6sOFQDlkY6El1B2P5gklzJfVdsT.jpg",
"overview": "In the world of Sougo Tokiwa and Sento Kiryu, their 'companions' are losing their memories one after the other as they're replaced by other people. The Super Time Jacker, Tid , appears before them. He orders his powerful underlings, Another Double and Another Den-O, to pursue a young boy called Shingo. While fighting to protect Shingo, Sougo meets Ataru, a young man who loves Riders, but Ataru says that Kamen Riders aren't real. What is the meaning of those words? While the mystery deepens, the true enemy that Sougo and Sento must defeat appears in the Kuriogatake mountain...",
"release_date": 1545436800
},
{
"id": "454294",
"title": "The Kid Who Would Be King",
"poster": "https://image.tmdb.org/t/p/w1280/kBuvLX6zynQP0sjyqbXV4jNaZ4E.jpg",
"overview": "Old-school magic meets the modern world when young Alex stumbles upon the mythical sword Excalibur. He soon unites his friends and enemies, and they become knights who join forces with the legendary wizard Merlin. Together, they must save mankind from the wicked enchantress Morgana and her army of supernatural warriors.",
"release_date": 1547596800
},
{
"id": "299536",
"title": "Avengers: Infinity War",
"poster": "https://image.tmdb.org/t/p/w1280/7WsyChQLEftFiDOVTGkv3hFpyyt.jpg",
"overview": "As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows: Thanos. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment - the fate of Earth and existence itself has never been more uncertain.",
"release_date": 1524618000,
"genre": "action"
},
{
"id": "399579",
"title": "Alita: Battle Angel",
"poster": "https://image.tmdb.org/t/p/w1280/xRWht48C2V8XNfzvPehyClOvDni.jpg",
"overview": "When Alita awakens with no memory of who she is in a future world she does not recognize, she is taken in by Ido, a compassionate doctor who realizes that somewhere in this abandoned cyborg shell is the heart and soul of a young woman with an extraordinary past.",
"release_date": 1548892800
},
{
"id": "404368",
"title": "Ralph Breaks the Internet",
"poster": "https://image.tmdb.org/t/p/w1280/lvfIaThG5HA8THf76nghKinjjji.jpg",
"overview": "Video game bad guy Ralph and fellow misfit Vanellope von Schweetz must risk it all by traveling to the World Wide Web in search of a replacement part to save Vanellope's video game, 'Sugar Rush.' In way over their heads, Ralph and Vanellope rely on the citizens of the internet -- the netizens -- to help navigate their way, including an entrepreneur named Yesss, who is the head algorithm and the heart and soul of trend-making site BuzzzTube.",
"release_date": 1542672000
},
{
"id": "456740",
"title": "Hellboy",
"poster": "https://image.tmdb.org/t/p/w1280/nUXCJMnAiwCpNPZuJH2n6h5hGtF.jpg",
"overview": "Hellboy comes to England, where he must defeat Nimue, Merlin's consort and the Blood Queen. But their battle will bring about the end of the world, a fate he desperately tries to turn away.",
"release_date": 1554944400
},
{
"id": "424783",
"title": "Bumblebee",
"poster": "https://image.tmdb.org/t/p/w1280/fw02ONlDhrYjTSZV8XO6hhU3ds3.jpg",
"overview": "On the run in the year 1987, Bumblebee finds refuge in a junkyard in a small Californian beach town. Charlie, on the cusp of turning 18 and trying to find her place in the world, discovers Bumblebee, battle-scarred and broken. When Charlie revives him, she quickly learns this is no ordinary yellow VW bug.",
"release_date": 1544832000
},
{
"id": "297802",
"title": "Aquaman",
"poster": "https://image.tmdb.org/t/p/w1280/5Kg76ldv7VxeX9YlcQXiowHgdX6.jpg",
"overview": "Once home to the most advanced civilization on Earth, Atlantis is now an underwater kingdom ruled by the power-hungry King Orm. With a vast army at his disposal, Orm plans to conquer the remaining oceanic people and then the surface world. Standing in his way is Arthur Curry, Orm's half-human, half-Atlantean brother and true heir to the throne.",
"release_date": 1544140800,
"genre": "action"
},
{
"id": "485811",
"title": "Redcon-1",
"poster": "https://image.tmdb.org/t/p/w1280/vVPrWngVJ2cfYAncBedQty69Dlf.jpg",
"overview": "After a zombie apocalypse spreads from a London prison, the UK is brought to its knees. The spread of the virus is temporarily contained but, without a cure, it’s only a matter of time before it breaks its boundaries and the biggest problem of all… any zombies with combat skills are now enhanced. With the South East of England quarantined from the rest of the world using fortified borders, intelligence finds that the scientist responsible for the outbreak is alive and well in London. With his recovery being the only hope of a cure, a squad of eight Special Forces soldiers is sent on a suicide mission to the city, now ruled by the undead, with a single task: get him out alive within 72 hours by any means necessary. What emerges is an unlikely pairing on a course to save humanity against ever-rising odds.",
"release_date": 1538096400
},
{
"id": "338952",
"title": "Fantastic Beasts: The Crimes of Grindelwald",
"poster": "https://image.tmdb.org/t/p/w1280/fMMrl8fD9gRCFJvsx0SuFwkEOop.jpg",
"overview": "Gellert Grindelwald has escaped imprisonment and has begun gathering followers to his cause—elevating wizards above all non-magical beings. The only one capable of putting a stop to him is the wizard he once called his closest friend, Albus Dumbledore. However, Dumbledore will need to seek help from the wizard who had thwarted Grindelwald once before, his former student Newt Scamander, who agrees to help, unaware of the dangers that lie ahead. Lines are drawn as love and loyalty are tested, even among the truest friends and family, in an increasingly divided wizarding world.",
"release_date": 1542153600,
"genre": "fantasy"
},
{
"id": "287947",
"title": "Shazam!",
"poster": "https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg",
"overview": "A boy is given the ability to become an adult superhero in times of need with a single magic word.",
"release_date": 1553299200,
"genre": "action"
}
],
"nbHits": 12,
"exhaustiveNbHits": false,
"query": "world",
"limit": 20,
"offset": 0,
"processingTimeMs": 2
} |
So at first glance, it seems that it is valid. In fact, we can't be sure that the So, according to the bucket sort system, each group generated by a rule that can't be tie broke is given to the rule after. In this case, the Maybe I'm wrong, that's just a first glance, if you try with a placeholder search, for example, it works fine. |
I'm not sure if this is helpful, but if you keep everything else the same but update the ranking rules first: curl -H 'X-MEILI-API-KEY: masterKey' -X POST 'http://localhost:7700/indexes/movies/settings/ranking-rules' --data '["words", "typo", "sort", "proximity", "attribute", "exactness"]' Then the results of the {
"hits": [
{
"id": "399579",
"title": "Alita: Battle Angel",
"poster": "https://image.tmdb.org/t/p/w1280/xRWht48C2V8XNfzvPehyClOvDni.jpg",
"overview": "When Alita awakens with no memory of who she is in a future world she does not recognize, she is taken in by Ido, a compassionate doctor who realizes that somewhere in this abandoned cyborg shell is the heart and soul of a young woman with an extraordinary past.",
"release_date": 1548892800
},
{
"id": "297802",
"title": "Aquaman",
"poster": "https://image.tmdb.org/t/p/w1280/5Kg76ldv7VxeX9YlcQXiowHgdX6.jpg",
"overview": "Once home to the most advanced civilization on Earth, Atlantis is now an underwater kingdom ruled by the power-hungry King Orm. With a vast army at his disposal, Orm plans to conquer the remaining oceanic people and then the surface world. Standing in his way is Arthur Curry, Orm's half-human, half-Atlantean brother and true heir to the throne.",
"release_date": 1544140800,
"genre": "action"
},
{
"id": "299536",
"title": "Avengers: Infinity War",
"poster": "https://image.tmdb.org/t/p/w1280/7WsyChQLEftFiDOVTGkv3hFpyyt.jpg",
"overview": "As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows: Thanos. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment - the fate of Earth and existence itself has never been more uncertain.",
"release_date": 1524618000,
"genre": "action"
},
{
"id": "424783",
"title": "Bumblebee",
"poster": "https://image.tmdb.org/t/p/w1280/fw02ONlDhrYjTSZV8XO6hhU3ds3.jpg",
"overview": "On the run in the year 1987, Bumblebee finds refuge in a junkyard in a small Californian beach town. Charlie, on the cusp of turning 18 and trying to find her place in the world, discovers Bumblebee, battle-scarred and broken. When Charlie revives him, she quickly learns this is no ordinary yellow VW bug.",
"release_date": 1544832000
},
{
"id": "338952",
"title": "Fantastic Beasts: The Crimes of Grindelwald",
"poster": "https://image.tmdb.org/t/p/w1280/fMMrl8fD9gRCFJvsx0SuFwkEOop.jpg",
"overview": "Gellert Grindelwald has escaped imprisonment and has begun gathering followers to his cause—elevating wizards above all non-magical beings. The only one capable of putting a stop to him is the wizard he once called his closest friend, Albus Dumbledore. However, Dumbledore will need to seek help from the wizard who had thwarted Grindelwald once before, his former student Newt Scamander, who agrees to help, unaware of the dangers that lie ahead. Lines are drawn as love and loyalty are tested, even among the truest friends and family, in an increasingly divided wizarding world.",
"release_date": 1542153600,
"genre": "fantasy"
},
{
"id": "456740",
"title": "Hellboy",
"poster": "https://image.tmdb.org/t/p/w1280/nUXCJMnAiwCpNPZuJH2n6h5hGtF.jpg",
"overview": "Hellboy comes to England, where he must defeat Nimue, Merlin's consort and the Blood Queen. But their battle will bring about the end of the world, a fate he desperately tries to turn away.",
"release_date": 1554944400
},
{
"id": "166428",
"title": "How to Train Your Dragon: The Hidden World",
"poster": "https://image.tmdb.org/t/p/w1280/xvx4Yhf0DVH8G4LzNISpMfFBDy2.jpg",
"overview": "As Hiccup fulfills his dream of creating a peaceful dragon utopia, Toothless’ discovery of an untamed, elusive mate draws the Night Fury away. When danger mounts at home and Hiccup’s reign as village chief is tested, both dragon and rider must make impossible decisions to save their kind.",
"release_date": 1546473600,
"genre": "cartoon"
},
{
"id": "543103",
"title": "Kamen Rider Heisei Generations FOREVER",
"poster": "https://image.tmdb.org/t/p/w1280/6sOFQDlkY6El1B2P5gklzJfVdsT.jpg",
"overview": "In the world of Sougo Tokiwa and Sento Kiryu, their 'companions' are losing their memories one after the other as they're replaced by other people. The Super Time Jacker, Tid , appears before them. He orders his powerful underlings, Another Double and Another Den-O, to pursue a young boy called Shingo. While fighting to protect Shingo, Sougo meets Ataru, a young man who loves Riders, but Ataru says that Kamen Riders aren't real. What is the meaning of those words? While the mystery deepens, the true enemy that Sougo and Sento must defeat appears in the Kuriogatake mountain...",
"release_date": 1545436800
},
{
"id": "404368",
"title": "Ralph Breaks the Internet",
"poster": "https://image.tmdb.org/t/p/w1280/lvfIaThG5HA8THf76nghKinjjji.jpg",
"overview": "Video game bad guy Ralph and fellow misfit Vanellope von Schweetz must risk it all by traveling to the World Wide Web in search of a replacement part to save Vanellope's video game, 'Sugar Rush.' In way over their heads, Ralph and Vanellope rely on the citizens of the internet -- the netizens -- to help navigate their way, including an entrepreneur named Yesss, who is the head algorithm and the heart and soul of trend-making site BuzzzTube.",
"release_date": 1542672000
},
{
"id": "485811",
"title": "Redcon-1",
"poster": "https://image.tmdb.org/t/p/w1280/vVPrWngVJ2cfYAncBedQty69Dlf.jpg",
"overview": "After a zombie apocalypse spreads from a London prison, the UK is brought to its knees. The spread of the virus is temporarily contained but, without a cure, it’s only a matter of time before it breaks its boundaries and the biggest problem of all… any zombies with combat skills are now enhanced. With the South East of England quarantined from the rest of the world using fortified borders, intelligence finds that the scientist responsible for the outbreak is alive and well in London. With his recovery being the only hope of a cure, a squad of eight Special Forces soldiers is sent on a suicide mission to the city, now ruled by the undead, with a single task: get him out alive within 72 hours by any means necessary. What emerges is an unlikely pairing on a course to save humanity against ever-rising odds.",
"release_date": 1538096400
},
{
"id": "454294",
"title": "The Kid Who Would Be King",
"poster": "https://image.tmdb.org/t/p/w1280/kBuvLX6zynQP0sjyqbXV4jNaZ4E.jpg",
"overview": "Old-school magic meets the modern world when young Alex stumbles upon the mythical sword Excalibur. He soon unites his friends and enemies, and they become knights who join forces with the legendary wizard Merlin. Together, they must save mankind from the wicked enchantress Morgana and her army of supernatural warriors.",
"release_date": 1547596800
},
{
"id": "287947",
"title": "Shazam!",
"poster": "https://image.tmdb.org/t/p/w1280/xnopI5Xtky18MPhK40cZAGAOVeV.jpg",
"overview": "A boy is given the ability to become an adult superhero in times of need with a single magic word.",
"release_date": 1553299200,
"genre": "action"
}
],
"nbHits": 12,
"exhaustiveNbHits": false,
"query": "world",
"limit": 20,
"offset": 0,
"processingTimeMs": 3
} |
Yup, if I remember correctly the |
Change the ranking rules makes it almost correct. |
Nope, not sure about that, |
OK, I understand now...but it makes sorting very confusing because it means the sort will rarely be in the order the end user expects :) |
Yup, that's a correct point but that's also a complex one. We will work on extensively documenting this feature. Imagine that you move the |
Hello @sanders41, thank you for testing it and for your feedback! Some information about sorting. 🤓 Sort on string value is working in lexicographical order and not alphabetical. We chose to place the ranking rule in the 5th position by default (after the Video.MP4.1064x946.mp4For this example, we use 2 different indexes with different ranking rule positions to show differences. We take a stand to provide a position that favors relevancy above all by default. Fortunately, the position is configurable to fit each use case. What could be missed here is to favor a default position that does not fit the user's use-case, thus forcing him to make an effort to configure it. If you want a sort that works exhaustively and therefore without relevancy, similar to an SQL system, you have to place it in the first position, and it will have very little interest for the end user except in some use-cases that we think are quite rare. |
Describe the bug
Using sort does not always return the results in the expected order. This is true for both asc and desc.
To Reproduce
Steps to reproduce the behavior:
movies
curl -X POST 'http://localhost:7700/indexes/movies/search' --data '{"q": "world", "sort": ["title:asc"]}'
. With this search the last title isShazam!
, but the results also containThe Kid Who Would Be King
which should come afterShazam!
.curl -H -X POST 'http://localhost:7700/indexes/movies/search' --data '{"q": "world", "sort": ["title:desc"]}'
. Again the last result isShazam!
, but it should beAlita: Battle Angel
.Expected behavior
I expected the results to be in alphabetical order by title.
MeiliSearch version:
v0.22.0rc0
Additional context
MeiliSearch running in Docker.
The text was updated successfully, but these errors were encountered: