gethugothemes / hugo-modules

30+ Powerful Hugo Modules Created By Gethugothemes.
https://gethugothemes.com/hugo-modules
MIT License
124 stars 53 forks source link

Duplicate content in search results #9

Closed mbrn-in closed 1 year ago

mbrn-in commented 1 year ago

Hi, thanks for the modules.

Looks like the search results shows some duplicate content. Please see the screenshot below for more details.

image

Link: https://demo.gethugothemes.com/bookworm/site/?s=cl

tfsojon commented 1 year ago

Hello @mbrn-in Thank you for using our Hugo Module. Basically the Bookworm Hugo themes post-content is duplicated from one post to another. That's why the search result look like duplicated. but the search-result comes from the individual keyword match.

Try search with title, tag, category or something else to understand the scenario. https://demo.gethugothemes.com/bookworm/site/?s=to

mbrn-in commented 1 year ago

Hi @tfsojon, thanks for your message.

The content on each page in Bookworm theme is different right? The search index here https://demo.gethugothemes.com/bookworm/site/searchindex.json has unique content for each page. But the search shows duplicate results.

I observed this issue while using your search module in one of my websites. Then I came back to the Bookworm demo site and realized that the error exists even there.

tfsojon commented 1 year ago

Hi @mbrn-in, Update your Hugo module using hugo mod clean && hugo mod get -u ./... && hugo mod tidy or in our bookworm theme npm run update-modules / yarn update-modules

If module not updates correctly with the command follow the steps 1 - delete go.sum file 2 - removegithub.com/gethugothemes/hugo-modules/search v0.0.0-******-***** // indirect line 3 - then start hugo server image

mbrn-in commented 1 year ago

Thanks for the fix @tfsojon . The problem has been solved.