How should I deal with folders with "items as default view" in search results

StackOverflow https://stackoverflow.com/questions/21675861

  •  09-10-2022
  •  | 
  •  

Pregunta

Are there any existing solutions to this issue: a folder with a page as a default view turns up in search results along with the page if both the titles have the same term. I.e. two results pointing to the same place.

I think this is a likely scenario, since the item used as default view essentially covers the folder's name, description etc, it is likely that they are named similarly.

¿Fue útil?

Solución

You can filter out such results by filtering out default pages; simply set is_default_page=False to your catalog query. Alternatively, don't include the Folder type in your search.

This would remove default pages or the folders altogether; you'd have to manually filter if you don't want to show both Folder and their default page results if both are present.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top