Search button isn't working
-
Sadly, my search isn't working
What I'm dealing with
"/search/ij
Failed to parse: { find: "searchpost", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric."Because i've searched the threads and found a simliar one ...what have I done:
- Checked up src/database/mongo/main.js - there's no such line on 56 ParseInt bla bla
- tried to install db-search plugin 0.3.1 - not working (search isn't available)
- log shows me a lot of unmet req. and I don't know how to install them ?
My version of MongoDB is 3.2.2
My NodeBB is 0.9.3
**My db-search plugin is 0.3.1
**
What are my options ? Why I'm failing so much ?Here's my output log when I try to install db-search manually:
# npm install nodebb-plugin-dbsearch
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/nodebb-plugin-dbsearch/-/nodebb-plugin-dbsearch-0.3.0.tgz
npm http 200 https://registry.npmjs.org/nodebb-plugin-dbsearch/-/nodebb-plugin-dbsearch-0.3.0.tgz
npm WARN unmet dependency /usr/share/nginx/html/nodebb/node_modules/socket.io-redis requires socket.io-adapter@'automattic/socket.io-adapter#de5cba' but will load
npm WARN unmet dependency /usr/share/nginx/html/nodebb/node_modules/socket.io-adapter,
npm WARN unmet dependency which is version 0.3.1
[email protected] nodebb-plugin-dbsearchMy NodeBB Log:
Wed, 17 Feb 2016 03:15:36 GMT express deprecated req.param(name, default): Use req.params, req.body, or req.query instead at node_modules/nodebb-plugin-imgshow/library.js:27:25
17/2 03:15 [19171] - error: [plugins] filter:search.query, Failed to parse: { find: "searchpost", filter: {}, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
17/2 03:15 [19171] - error: /api/search
MongoError: Failed to parse: { find: "searchpost", filter: {}, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
at Function.MongoError.create (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:281:36)
at Callbacks.emit (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
at null.messageHandler (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:249:23)
at Socket.<anonymous> (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:265:22)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (stream_readable.js:765:14)
at Socket.emit (events.js:92:17)
at emitReadable (_stream_readable.js:427:10)
at emitReadable (_stream_readable.js:423:5)
17/2 03:15 [19171] - error: [plugins] filter:search.query, Failed to parse: { find: "searchpost", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
17/2 03:15 [19171] - error: /api/search/ij
MongoError: Failed to parse: { find: "searchpost", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
at Function.MongoError.create (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:281:36)
at Callbacks.emit (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
at null.messageHandler (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:249:23)
at Socket.<anonymous> (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:265:22)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (stream_readable.js:765:14)
at Socket.emit (events.js:92:17)
at emitReadable (_stream_readable.js:427:10)
at emitReadable (_stream_readable.js:423:5)
17/2 03:15 [19171] - error: [plugins] filter:search.query, Failed to parse: { find: "searchtopic", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
17/2 03:15 [19171] - error: [plugins] filter:search.query, Failed to parse: { find: "searchpost", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
17/2 03:15 [19171] - error: /search/ij
MongoError: Failed to parse: { find: "searchpost", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
at Function.MongoError.create (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:281:36)
at Callbacks.emit (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
at null.messageHandler (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:249:23)
at Socket.<anonymous> (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:265:22)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (stream_readable.js:765:14)
at Socket.emit (events.js:92:17)
at emitReadable (_stream_readable.js:427:10)
at emitReadable (_stream_readable.js:423:5)
17/2 03:15 [19171] - error: [plugins] filter:search.query, Failed to parse: { find: "searchtopic", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
17/2 03:15 [19171] - error: [plugins] filter:search.query, Failed to parse: { find: "searchpost", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
17/2 03:15 [19171] - error: /search/ij
MongoError: Failed to parse: { find: "searchpost", filter: { $text: { $search: "ij" } }, projection: { _id: 0, id: 1 }, limit: "50" }. 'limit' field must be numeric.
at Function.MongoError.create (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:281:36)
at Callbacks.emit (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3)
at null.messageHandler (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:249:23)
at Socket.<anonymous> (/usr/share/nginx/html/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:265:22)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (stream_readable.js:765:14)
at Socket.emit (events.js:92:17)
at emitReadable (_stream_readable.js:427:10) -
[email protected] nodebb-plugin-dbsearch
**My db-search plugin is 0.3.1
It seems your version is
0.3.0
and updating to0.3.1
should fix your issue.NodeBB has static versions stated within its package.json (like this).
So you need to modify that in order to get0.3.1
instead of0.3.0
resolved.Btw. @devs I'd love to hear some reasoning for this decision, I think it's bad behavior not to use version ranges here.
-
@frissdiegurke can you be more specific what actions should be taken, please?
-
- change package.json version string of
nodebb-plugin-dbsearch
to0.3.1
npm install nodebb-plugin-dbsearch
- restart NodeBB
- change package.json version string of
-
npm http GET https://registry.npmjs.org/nodebb-plugin-dbsearch/-/nodebb-plugin-dbsearch-0.3.0.tgz
npm http 200 https://registry.npmjs.org/nodebb-plugin-dbsearch/-/nodebb-plugin-dbsearch-0.3.0.tgz
npm WARN unmet dependency /usr/share/nginx/html/nodebb/node_modules/socket.io-redis requires socket.io-adapter@'automattic/socket.io-adapter#de5cba' but will load
npm WARN unmet dependency /usr/share/nginx/html/nodebb/node_modules/socket.io-adapter,
npm WARN unmet dependency which is version 0.3.1
[email protected] nodebb-plugin-dbsearch
root@e-knigiclub e-knigi/node_modules#same thing....
-
please try
npm install [email protected]
-