NEED HELP!!! Trying to Query Description field in Products Collection and getting no results

Hi everyone,

I am trying to query the “Description” field in Products Database collection and its not returning any results. But when I query fields like “Name” , i do get the data back. Now, the only difference i see between the two fields is that the “Description” field type is “Rich Text” and the “Name” field is “Text”.

Here is how i am doing the query. I have a text box with ID “iSKU” and on key press event I am calling the function to query collection.

Have some experienced the same issue? Thanks in advance


import wixData from ‘wix-data’;
function filter(keyWord)
{
wixData.query(‘Stores/Products’)
.contains(‘description’, keyWord)
.find()
.then(res => {

    $w('#repeater1').data = res.items; 
}); 

}
export function iSKU_keyPress(event, $w) {
//Add your code for this event here:
filter($w(‘#iSKU’).value);
}

Hi,
Please share your editor’s URL so we can inspect, only authorised wix employees can use the link .

how do you get it to work with name, because i keep getting an error and (.data) is not being recognized it comes up with a red line

Please add this as a new forum post with a link to refer to this previous post if needed, rather than bumping up an old thread from 2018.

Also, add your used code in a code block so that we can see what you have used yourself on your page.

You can read about the Wix Stores collections here and how they can be filtered etc.
https://support.wix.com/en/corvid-by-wix/wix-stores-with-corvid

Take a look at this other very recent post about similar issues here.
https://www.wix.com/corvid/forum/community-discussion/product-search-box-and-more

Along with using Wix Data Query and the contains() function.
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#contains

Old post being closed.