Any way to only include a particular page (such as DispForm.aspx) in Search Results?
-
09-12-2019 - |
Question
I'm trying to create a search scope in SharePoint 2007 that searches all lists in a given site. But I want the results to only include the actual list item itself, not the all items form or anything else.
Except it seems that search scopes can only include/exclude items at the folder level. Is there any way I can create a simple search scope to only include the following:
http://*/DispForm.aspx
Solution
your url is wrong, try this instead:
http://< domain url>/* /*/DispForm.aspx
If i was to split it up it would be like this:
url
http://< domain url>
parent folder levels (2)
/* /*/
the aspx file you want ;)
DispForm.aspx
an example is:
http://portal.microsoft.com/*/*/DispForm.aspx
Also you need to ammend or create a search rule within cental admin.
1) goto central admin
2) click on Shared Services Administration
3) click Shared Services
4) click Search Settings
5) click New Crawl Rule
6) add url parths you want to include/exclude from the crawl list :)
add the url above to the allow section and all other urls to disallow :)
hope it helps :)
OTHER TIPS
You should be able to use the following:
Scope Rule Type: Property Query
Property Query: FileExtension = aspx
Behavior: Require
In order to have the FileExtension property be available you will need to go to Search Administration within Central Administration and edit the FileExtension Managed Property (Search Administration > Metadata Properties and find FileExtension). Check the box "Allow this property to be used in scopes" checkbox and click OK. Then run a full crawl.