Open
Description
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
-
Create a
docs
collection -
Create a
docs_view
view
{
"links": {
"docs": {
"analyzers": [
"identity", "text_en"
],
"fields": {},
"includeAllFields": true,
"storeValues": "id",
"trackListPositions": false
}
}
}
- 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" }
- 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