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 asap@1.0.0 No repository field.
    npm WARN package.json callsite@1.0.0 No repository field.
    npm WARN package.json eyes@0.1.8 No repository field.
    npm WARN package.json has-binary@0.1.6 No repository field.
    npm WARN package.json has-binary-data@0.1.3 No repository field.
    npm WARN package.json indexof@0.0.1 No repository field.
    npm WARN package.json object-component@0.0.3 No repository field.
    npm WARN package.json parsejson@0.0.1 No repository field.
    npm WARN package.json parseqs@0.0.2 No repository field.
    npm WARN package.json parseuri@0.0.2 No repository field.
    npm WARN package.json pause@0.0.1 No repository field.
    npm WARN package.json sylvester@0.0.21 No repository field.
    npm WARN package.json uid2@0.0.3 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
    nodebb-plugin-dbsearch@0.3.0 nodebb-plugin-dbsearch

    My 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)


  • GNU/Linux

    nodebb-plugin-dbsearch@0.3.0 nodebb-plugin-dbsearch

    **My db-search plugin is 0.3.1

    It seems your version is 0.3.0 and updating to 0.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 get 0.3.1 instead of 0.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?


  • GNU/Linux

    1. change package.json version string of nodebb-plugin-dbsearch to 0.3.1
    2. npm install nodebb-plugin-dbsearch
    3. restart NodeBB


  • @frissdiegurke

    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
    nodebb-plugin-dbsearch@0.3.0 nodebb-plugin-dbsearch
    root@e-knigiclub e-knigi/node_modules#

    same thing....


  • GNU/Linux

    please try npm install nodebb-plugin-dbsearch@0.3.1



  • Managed to fix it

    Did editing of the package.json file
    went to node_modules;
    make installation of 0.3.0 which was offered by npm;
    upgrade button appeared on the db-search plugin;
    made upgrade trough admin panel;
    it worked!

    Thank you for the support!


Log in to reply
 


Star

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.