Prioritising pages belonging to a folder

We have a folder inside which are all our course pages.

That folder is /course/

How do I prioritise all content in this folder when corresponding with search queries?

For example, if someone types in 'art', I want our art courses to appear before our art gallery.

Many thanks!

1 Like

Hi @thack,

The more simple and if you use logstash or ingest is adding a weight field depends on the folder so let's say course have 2 points gallery have 1 etc... so you can sort on this field or mix with other fields to sort on.
But you need to reindex your data to set the weight.

1 Like

Can you provide two sample documents (one with and one without the course folder) and your query?

I'd assume you could build this with a should clause on the course folder in addition to a must for the search term, but it will be much easier if we don't have to guess your current document and query structure.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.