Passing on search terms to other search pages

I am continuing in my quest to have half my results page display pages and the other half PDF files!


After playing around with lots of css with the results on a normal page I don't think there is anything 100% satisfactory.



Is it possible to nest two search page results into another search page (or a normal page, if that would be better)? So the user types their keyword in and it then searches two different search pages and the results from those pages are listed side by side.



Anyone know the steps to do this?



At first stored search looked like it might help but we are on 3.16.12 and it looks like that is only available in 3.18.


Hi Rachel,

You're right, you can nest in search pages to work this way. If you set up 2 search pages each with identical search field names, you could get this to work right.

HOWEVER, you will run into issues when it comes to auto generated links from the search page, like the next and previous links, page list items etc. You will find that when you click these links it will take you to the actual search page and then its second page of results. You can put these GET variables on the page that nests the Searches and it will work again, however you will probably have to rewrite these with JavaScript. You might be able to do something fancy with a paintlayout. If you apply a paint layout to each of the search pages, and for the 'search page type format' of the paint layout, nest a redirect page to the url '.' it will redirect to the parent page, which will be the standard page nesting the searches. You will need to set up the redirect page to maintain the GET request variables on redirecting.

Chris

Thanks Chris, I will have a ponder overnight and give it a go tomorrow. Would stored search be any help in this situation (ie should I wait for an upgrade before attempting this)?


Sorry mate, I've not 'dallied' in 3.18 features yet

I dont think stored search will help. But I am not exactly clear what you are trying to achieve and why - there are a lot of things that I would see getting in the way. Nesting two searches and then offering a choice of would you like to search pdf or pages makes some sense to me. But it depends on the use cases for the search rather.

Okay, here is my thinking:


I find that people assume they know how search will work on a site because they expect every site to work the same. If I try and have two separate searches, one for pages and one for PDFs, I strongly suspect that people will never read the explanation and just get cross and leave. I watch people while they browse websites and I see this kind of behaviour constantly.



Because we have a lot of PDFs (not how I'd like things but reality) that contain a lot of words they tend to rank really well in searches. I am still playing with the weightings but I am finding it very tricky to get the pages on a topic to show in front of PDFs on a topic. The PDFs still need to be searchable so I can't just exclude them.



This is why I want people to just have one field but get both pages and PDFs back. On a previous site I was able to have pages show in one column and PDFs in the other and got a lot of positive feedback. It means that if people are looking for information generally they can scan down one column and if they want a page down the other. I will use a heading and icons to make it clear which column is which.



So that's where I want to go. Is that clearer now? And am I on the right track in getting there?

[quote]Okay, here is my thinking:


I find that people assume they know how search will work on a site because they expect every site to work the same. If I try and have two separate searches, one for pages and one for PDFs, I strongly suspect that people will never read the explanation and just get cross and leave. I watch people while they browse websites and I see this kind of behaviour constantly.



Because we have a lot of PDFs (not how I’d like things but reality) that contain a lot of words they tend to rank really well in searches. I am still playing with the weightings but I am finding it very tricky to get the pages on a topic to show in front of PDFs on a topic. The PDFs still need to be searchable so I can’t just exclude them.



This is why I want people to just have one field but get both pages and PDFs back. On a previous site I was able to have pages show in one column and PDFs in the other and got a lot of positive feedback. It means that if people are looking for information generally they can scan down one column and if they want a page down the other. I will use a heading and icons to make it clear which column is which.



So that’s where I want to go. Is that clearer now? And am I on the right track in getting there?[/quote]



You can get pages to weight higher than PDFs but the weightings need to be hugely skewed to account for the fact that the PDFs have more uses of the words in.



eg search on Shelter - search for “renting” the first PDF is on the second page, “legal action” has a mix on the first page.



http://england.shelter.org.uk/search_results



We spent a lot of time getting the right weightings and results for this site.