Hi
I'm new to sharepoint search in Sharepoint 2010 and am trying to work out how to set up a search scope for a particular document library which exists in a number of subsites. We have a site collection which represents an organisation and a subsite for each user within the organisation. The subsites are created programmatically when users are added to the site collection. The subsites contain a document library containing the documents for a single user and we want to create a standard and advanced search page to allow the user to search their own documents. I pan to do this using the OOB search box and advanced search box. So the document library will exist in the following locations:
http://my site/user1/Lists/MyDocumentLibrary
http://my site/user2/Lists/MyDocumentLibrary
I have been looking into search scopes and I think I need to create a search scope which i can reference in the OOB search webparts to limit the search results. The question is where do I create the search scope(s)? Do i need to create one scope per user (per site) or can I create one at the site collection level which will work for the document library in all sites. Or do I need to come up with a rule which will cover all document libraries from the site colletion level, or do I programmatically create one search scope per site when I programmatically create the site and then programmatically add this search scope to the page on each site as it is created?
Most blogs/tutorials I've looked at show search scopes being set up with absolute paths to specific lists/libraries on specific sites but I'll need my scope to be flexible enough to cover multiple subsites.