Search code examples
indexinglucenecontent-management-systemjackrabbitmagnolia

Magnolia 5.5 Exclude Search Page from Search


To my understanding of what is written here: Magnolia Search Documentation I added a Search Page as a new template. The SearchPage itself has no content but can be listed in the search results.

My Questions are:

  1. How can I exclude this page (for example by template) from indexing?

  2. I know that in my magnolia workspace folder "website" there is a workspace.xml. Is it right, that if I wanted to use my own indexing_configuration.xml, i could place it there?

  3. How would I reset and restart the index with the new configuration?


Solution

    1. depends who does the excluding. I.e. If you want editors to be able to exclude page, easiest is to add field to page props to "hide from search results" and then wrap results in iterate that will check for the flag and skip if found. If sys admin does the excluding you can change indexing confit and exclude page there as you seem to be trying.
    2. yes, that's where it goes
    3. shutdown, delete index subfolder (make copy of it first) in website folder, start up. Re indexing will happen automatically on startup. Depending on amount of data might take a while. If you have corrupted repo, reindexing might fail (hence the backup) but then you have different problems :)