Problems with wix-search? new posts not showing up

I’m using wix-search (not wix-data) to search forum posts.

wixSearch.search(“TEST”).documentType(“Forum/Content”).find().then(results => console.log(results))

I have 2 problems:

  1. most importantly, a brand new forum post I just made doesn’t show up and it it has “TEST” in title and body. I look manually in the forum database and my new post is there. My new post is there on the preview and the published site but i can’t for the life of me get it to show up using wix-search. ALL MY OLD POSTS FROM WEEKS AGO WITH THE WORD TEST SHOW UP BUT NOT THE NEW ONE.
  2. there are duplicates in my results even when I search for a single word. I know I can remove dups but why is there dups?

do i just need to use wix-data and manually search the database? I thought this would be easier, but the functionality appears to be completely broken, also a side note - the typescript types for forum post search results need to be updated, but no big deal.

Please post the URL of your site so this can be evaluated.

https://alexis16389.wixsite.com/website-6/forum/as360-community

or

https://alexis16389.wixsite.com/website-6/

You may need to make an account to access the forums.

EDIT2: After some more testing it seems to have something to do with me making the post in preview mode and then publishing. When I made a new post just now on the live site it showed up in search right away without the need for me to edit it and republish which is good. Doesn’t make much sense cause the original post from yesterday was visible both on preview and published mode on the forums and was in the forum database and I made sure to publish the site. Can anyone explain why this would be? Still having the problems of dups with the api and the main search bar on the home page though. I can filter them out of the api results easy enough but I’d like to remove them from the main search bar results (on home page) as well too, which is a problem.

please see my post below, thanks for your fast response.

Another interesting thing, the dups I am getting from the wix-search api for some reason have different _id properties even though there is only one post on the forums (with no comments). So I am currently filtering out dups by url. (any implications to this??) Should I seriously consider redoing all my code to use wix-data? this api seems slightly broken unfortunately. While I did get the main problem fixed the dups are annoying and still appear in the main search bar results because that is just a precoded wix element and there is no code on the Search results page. I would really appreciate if a member of the corvid team could look into this for me, feel free to create an account on my website but I really think this is a bug in the wix-search api.