query-engine icon indicating copy to clipboard operation
query-engine copied to clipboard

Error 'Couldn't find the selector' when changing properties order in findAllLive

Open timaschew opened this issue 11 years ago • 1 comments

I'm using docpad 6.59 and node 0.10.12

If I define this collection

pages: (database) ->
    database.findAllLive({relativeOutDirPath:/de[\/\\]\w+/, pageOrder: $exists: true})

it works, but when I change the order, it fails:

pages: (database) ->
    database.findAllLive({pageOrder: $exists: true, relativeOutDirPath:/de[\/\\]\w+/})

Error:

error: An error occured: 
Error: Couldn't find the selector relativeOutDirPath
    at Query.compileSelector (./node_modules/docpad/node_modules/query-engine/out/lib/query-engine.js:1492:15)

timaschew avatar Jan 14 '14 00:01 timaschew

I just got this error while trying to manipulate the query object as well.

Though you might try:

pages: (database) ->
    database.findAllLive({pageOrder: { $exists: true }, relativeOutDirPath:/de[\/\\]\w+/})

The Coffeescript shorthand might be messing things up.

protometa avatar Jan 24 '14 17:01 protometa