From: 20060524 on
Is there a way to limit search results based on items returned by a view?
From: "Steven Cheng" on
Hi,

As for restricing the search results, I think there are two possible ways
to do it:

** One way is to customize the search result page after the query finished
and result be returned.

** Another is change the search results in code or perform a custom search
component(webpart or page) to let user search, and you can use your own
code to call sharepoint search API or webservice to search items:

#SharePoint Custom Search Results Page
http://www.codeproject.com/KB/aspnet/SPCustomSearchResults.aspx

#filter the sharepoint's search results
http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/290
7c726-a208-4456-bbd7-204b999f4f78

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg(a)microsoft.com.


--------------------
From: =?Utf-8?B?MjAwNjA1MjRAbmV3c2dyb3Vwcy5ub3NwYW0=?=
<20060524(a)newsgroups.nospam>
Subject: Restrict search using a view
Date: Tue, 9 Mar 2010 12:23:01 -0800

Is there a way to limit search results based on items returned by a view?
From: 20060524 on
I appreciate your response; the articles are indeed useful for refining the
search results, but the methods discussed do not outline a way to accept the
Filter criteria specified in a view before doing a search.

The closest I've found is using the Property Restrictions feature of the
Advanced Search Box Web Part.

I believe the desired goal would be met if there was a way to pre-populate
the Property Restrictions with the same Filter criteria in a view.

Again, any help is appreciated, thanks!
From: "Steven Cheng" on
Thanks for the reply,

As for prepopulating the property restrictions, do you mean programmtically
populate those search options on the Adv search box webpart? The Adv search
box webpart is of the following type in MOSS search assembly:

Name: Microsoft.Office.Server.Search.WebControls.AdvancedSearchBox
Assembly: Microsoft.Office.Server.Search, Version=12.0.0.0

by inspecting through reflector, we can find that it is a sealed class. but
it is possible to buid a custom webpart which use it as a composite child
control so that your webpart can programmtically set some public properties
on it.

If using or extending existing UI or webpart not work, we may still turn to
creating a complete custom webpart or search UI and use MOSS SEARCH API/OM
to perform the query

#Utilizing MOSS Search Programmatically via the OM or Web Services
http://blogs.msdn.com/scaravajal/archive/2007/07/12/moss-search-remote-acces
s-via-web-services.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg(a)microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.


--------------------
From: =?Utf-8?B?MjAwNjA1MjRAbmV3c2dyb3Vwcy5ub3NwYW0=?=
<20060524(a)newsgroups.nospam>
References: <220AC932-3D6A-4235-BF6B-28B86E071968(a)microsoft.com>
<IChR6XCwKHA.3724(a)TK2MSFTNGHUB02.phx.gbl>
Subject: RE: Restrict search using a view
Date: Wed, 10 Mar 2010 16:09:01 -0800

I appreciate your response; the articles are indeed useful for refining the
search results, but the methods discussed do not outline a way to accept
the
Filter criteria specified in a view before doing a search.

The closest I've found is using the Property Restrictions feature of the
Advanced Search Box Web Part.

I believe the desired goal would be met if there was a way to pre-populate
the Property Restrictions with the same Filter criteria in a view.

Again, any help is appreciated, thanks!