Shyli's Enterprise Search Platform Forum
Welcome Guest Active Topics | Log In | Register

New Topic Post Reply Tag as favorite
Filter Search Results at the Web Part Level
jvinitsky Offline
#1 Posted : Sunday, December 06, 2009 10:07:45 PM

Rank: Newbie

Posts: 4
Points: 12
Location: NJ
Has anyone had any success setting the ESP Result List Web Part so that the results are filtered based on a Index Field property. For example, I would like to create an SharePoint Web Part based search interface such that results are only from a specific document library, SharePoint Site, or Content Type.

The only way I've been able to do this so far is by creating a Search Profile in the FAST SBC and then setting the Result List Web Part to the Search View that is associated with it.

For example, in the Search Profile method we use the following expression in the Filter Terms setting located in SBC-->Search Profile Settings-->Query Handling

Code:
weburl:OR("http://companyportal/sites/finance/default.aspx")


such that the Search Profile returns results only from the Finance Site.

I'd rather not do this all the time as the Query Statistics are then spread out across different Search Profiles.

Can I do something like this in one of the settings of the FAST ESP Web Part? I've tried using the Static Query Properties Setting but have had no luck affecting any search behavior with it.

Regards,

Jack Vinitsky
Knowledge Systems Developer
SharePoint, FAST ESP, SQL Server, .NET
Guest
#2 Posted : Wednesday, January 27, 2010 6:02:16 PM

Rank: Guest

Posts: 142
Points: 473
Hi jvinitsky,

Our company is looking to do the same thing as your question. I noticed you did not recieve a reply in teh codeplex area, have you found a solution?

Guest
#3 Posted : Wednesday, February 17, 2010 2:49:44 PM

Rank: Guest

Posts: 142
Points: 473
To all those interested, I received a solution from the MS/FAST ESP Partner community message board

Quote:

Hi Jack,

I was able to get some suggestions on this. I assume you are asking about
the codeplex webparts. If so, we expect that you would need to modify the
code.

In the ESPSearchConfig web part, add a line similar to the below example:

Code:

[Category(_CATEGORY_STR),Personalizable(PersonalizationScope.Shared),WebBrowsable(false)]
        public string FilterTerm
        {
            get;
            set;
        }


And then insert some FQL in ESPSearchManager.cs such as the below example:
change:

Code:

string outerFql = string.Format("string(\"{0}\",mode=\"simpleany\")",
baseQuery)
... to something like this ...
string outerFql = string.Format("and(string(\"{0}\",mode=\"simpleany\"),
filter(weburl:{1})", baseQuery, filterTerm)


You would get the filterTerm to build the above URL in ESPSearchManager.cs
with a statement like this: searchSettings.FilterTerm. And pass it from the
Search method to the BuildXrankFql method.

Or, you could probably get the URL you wanted more dynamically

There is still a lot of search result pages and configuration, so I don't
know if you could also consider adding a drop down menu or something to the
ESPSearchBox webpart.

Hopefully the above guidance will be helpful. If more assistance is needed,
you would be best to contact Global Services for more assistance on this
customization.

Thanks!
Rob Vazzana | Microsoft | Enterprise Search Group | Senior Support Engineer
|


I think the above proposed changes to the Search Config/Search Result Web Part seem reasonable. When I get some time to work on this, I will post back.
Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply Tag as favorite
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.