10000 ArangoSearch SORT with LIMIT (offset/size) · Issue #9975 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content
ArangoSearch SORT with LIMIT (offset/size) #9975
Open
@aveiros

Description

@aveiros

My Environment

  • ArangoDB Version: 3.5.0
  • Storage Engine: RocksDB
  • Deployment Mode: Single Server
  • Deployment Strategy: ArangoDB Starter in Docker
  • Infrastructure: own
  • Operating System: MacOS 10.13.4
  • Total RAM in your machine: 32Gb
  • Disks in use: SSD
  • Used Package: Docker - official Docker library

Description: SORT and LIMIT on a View returning incorrect results

  1. Create a docs collection

  2. Create a docs_view view

{
  "links": {
    "docs": {
      "analyzers": [
        "identity", "text_en"
      ],
      "fields": {},
      "includeAllFields": true,
      "storeValues": "id",
      "trackListPositions": false
    }
  }
}
  1. Create the following 4 documents as follow
{ "_key": "doc1", "keywords": "development business" }
{ "_key": "doc2", "keywords": "development business" }
{ "_key": "doc3", "keywords": "development business" }
{ "_key": "doc4", "keywords": "development business" }
  1. Perform the following queries
// page 1
FOR d IN docs_view SEARCH ANALYZER(d.keywords IN TOKENS('development', 'text_en'), 'text_en') SORT BM25(d) DESC LIMIT 0, 2 RETURN d
// page 2
FOR d IN docs_view SEARCH ANALYZER(d.keywords IN TOKENS('development', 'text_en'), 'text_en') SORT BM25(d) DESC LIMIT 2, 2 RETURN d

both queries return doc3 and doc4

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0