Hi!,
I have a search function that searches a column in the database table. There’s only a single row of data. Which contains “drone this is a drone” string in description column.
If I use fullText search I get the result if the searched text is “drone” but except that no matter what single or combination word I use. I don’t get any result.
Any help/suggestion would be appreciated.
Thank you!
can you share code example of how you are doing that full text search?
Sure ser!
const query = new Moralis.Query("listed_nfts");
query.fullText("name", q);
if(order == "desc") {
query.descending("price");
}else {
query.ascending("price");
}
query.equalTo("status", true);
const result = await query.find();
It looks like it worked fine for me this test:
query = new Moralis.Query("Eggs");
query.fullText("data_x", "asd");
result = await query.find();
yes ser. It should be working. But idk what’s wrong with my fulltext search results. I guess I will just populate more data into the table and try searching then. Maybe check the precision that way.
what string did you search and you didn’t get results? did you try searching “this” string?
Yes, I did. I tried all combinations. “this”, “this is”, “this a”, “is a”. everything. But only “drone” seems to work.
you are still having that problem?
can you share your Moralis server url and application id?
I haven’t tried it yet for now. I have left it aside and doing other stuffs. I will only implement it after I fill out more data in the db. Right now i’m using the moralis api to searchNFTs.
Thank you for response ser. I will post it here after I try it again soon.