Skip to content
New issue

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

Full text search is not working #1633

Open
juliamchdo opened this issue Feb 15, 2025 · 3 comments
Open

Full text search is not working #1633

juliamchdo opened this issue Feb 15, 2025 · 3 comments

Comments

@juliamchdo
Copy link

I have this server.json file:

{
"transactions" : [
{
"id": 1,
"description": "Desenvolvimento de site",
"type": "income",
"category": "Venda",
"price": 14000,
"createdAt": "2025-02-14T19:19:17.664Z"
},
{
"id": 2,
"description": "Sushi",
"type": "outcome",
"category": "Alimentação",
"price": 200,
"createdAt": "2025-02-14T20:19:17.664Z"
},
{
"id": 3,
"description": "Ar condicionado",
"type": "outcome",
"category": "Casa",
"price": 3000,
"createdAt": "2025-03-14T10:19:17.664Z"
}
]
}

but when I search for http://localhost:3000/transactions?q=Sushi, it returns all the results, not just the one with 'Sushi' in it.

@yumuysl
Copy link

yumuysl commented Feb 18, 2025

”description=Sushi” is true

@heitorvaldeger
Copy link

heitorvaldeger commented Mar 6, 2025

Hey @juliamchdo, I did lib version downgrade to v0 and it works

@shin-tran
Copy link

You need to downgrade the current version of json-server to version 0.17.4 to be able to use it.

Run this command in your project.

npm i [email protected]

to crosscheck just run: npx json-server --version
it will show you : 0.17.4

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants