We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
after git clone and npm install and node ./bin/index.js, the full text search is not working.
git clone
npm install
node ./bin/index.js
db.json using:
{ "posts": [ { "id": 1, "title": "json-server", "author": "typicode" } ], "comments": [ { "id": 1, "body": "some comment", "postId": 1 } ] }
Query using:
GET http://localhost:3000/post?q=json-server
It appears that the below code didn't run into the array = db().filter() and for loop is not running at all:
array = db().filter()
if (req.query.q) { // Full-text search var q = req.query.q.toLowerCase() array = db(req.params.resource).filter(function(obj) { for (var key in obj) { var value = obj[key] if (_.isString(value) && value.toLowerCase().indexOf(q) !== -1) { return true } } }) } else {
Can anyone tell me how to get full text search working?
The text was updated successfully, but these errors were encountered:
wrong url used... close the issue for good..
Sorry, something went wrong.
No branches or pull requests
after
git clone
andnpm install
andnode ./bin/index.js
, the full text search is not working.db.json using:
Query using:
GET http://localhost:3000/post?q=json-server
It appears that the below code didn't run into the
array = db().filter()
and for loop is not running at all:Can anyone tell me how to get full text search working?
The text was updated successfully, but these errors were encountered: