Skip to content

Manticore crashes when using hybrid search and scroll pagination together #4404

@Nick-S-2018

Description

@Nick-S-2018

Bug Description:

The issue seems to appear if any other fields besides id are included in sort.

curl localhost:9308/sql?mode=raw -d "create table test(f1 text, f2 int, f3 float_vector knn_type='hnsw' hnsw_similarity='L2' model_name='sentence-transformers/all-MiniLM-L6-v2' FROM='f1')";

[{"total":0,"error":"","warning":""}]


curl localhost:9308/sql?mode=raw -d "insert into test(f1, f2) values('some content 1', 1), ('some content 2', 2)";

[{"total":2,"error":"","warning":""}]

curl localhost:9308/search -d '
{
  "table": "test",
  "query": {
          "query_string": "content"
  },
  "sort": [
    {"f2": "asc"},
    { "id": "asc" }
  ],
  "limit": 1,
  "_source": ["id"],
  "options": {
    "scroll": true,
    "fusion_method": "rrf"
  },
  "knn": {
    "field": "f3",
    "query": "content"
  }
}
'

{"took":15,"timed_out":false,"hits":{"total":2,"total_relation":"eq","hits":[{"_id":9154968273350033409,"_score":1,"_knn_dist":0.44707680,"_hybrid_score":0.03278688,"_source":{}}]},"scroll":"eyJvcmRlcl9ieV9zdHIiOiJmMiBhc2MsIGlkIGFzYyIsIm9yZGVyX2J5IjpbeyJhdHRyIjoiZjIiLCJkZXNjIjpmYWxzZSwidmFsdWUiOjEsInR5cGUiOiJpbnQifSx7ImF0dHIiOiJpZCIsImRlc2MiOmZhbHNlLCJ2YWx1ZSI6OTE1NDk2ODI3MzM1MDAzMzQwOSwidHlwZSI6ImludCJ9XX0="}


curl localhost:9308/search -d '
{
  "table": "test",
  "query": {
          "query_string": "content"
  },
  "sort": [
    {"f2": "asc"},
    { "id": "asc" }
  ],
  "limit": 1,
  "_source": ["id"],
  "options": {
    "scroll": "eyJvcmRlcl9ieV9zdHIiOiJmMiBhc2MsIGlkIGFzYyIsIm9yZGVyX2J5IjpbeyJhdHRyIjoiZjIiLCJkZXNjIjpmYWxzZSwidmFsdWUiOjEsInR5cGUiOiJpbnQifSx7ImF0dHIiOiJpZCIsImRlc2MiOmZhbHNlLCJ2YWx1ZSI6OTE1NDk2ODI3MzM1MDAzMzQwOSwidHlwZSI6ImludCJ9XX0=",
    "fusion_method": "rrf"
  },
  "knn": {
    "field": "f3",
    "query": "content"
  }
}
'

Manticore crashes after that last request.

Manticore Search Version:

Manticore 24.2.1 589839913@26032308 dev

Operating System Version:

Ubuntu 22:04

Have you tried the latest development version?

Yes

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

Details
  • Implementation completed
  • Tests developed
  • Documentation updated
  • Documentation reviewed

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions