Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a custom search page with a core search web part. It builds a query string in URL to populate the search results. k=[keyword] is the first, then to narrow the search to specific business area we use u=https://domain/Business/Lists/TheList. This works well, but we need to filter the searches by the lists column.

So we may have a list that is populated with articles for numerous business areas, so we need to filter the results to a specific business area. Is there any way to do this through the URL?

So...https://domain/search.aspx?k=test&u=https://domain/Business/List&column name:column value?

share|improve this question
add comment

2 Answers

You can specify property restrictions as part of the k query parameter just specify https://domain/search.aspx?k=test%20column1%3Dvalue1%20column2%3Dvalue2&u=https://domain/Business/List (%3D is =)

For full syntax of keyword queries see Keyword Query Syntax Reference and more specific Property Restriction Keyword Queries

In order for data to be available for search, they have to be exposed as managed properties in the Search Service Application. Search is a large and complicated topic, but for a start on managed properties you can look at Manage metadata properties for search

share|improve this answer
    
I just tried that, so my query looked like: domain/…, but it didn't return any results when there is a list item called test with test written in it logged under the My Area Business Area. –  Tom Oct 15 '12 at 13:43
    
Two things: you need quotes around "My Area" as it contains a space and you need to specify a managed property which is mapped to Business Area –  Per Jakobsen Oct 15 '12 at 13:51
    
Sorry to be a pain, but how would I go about doing that? Is it in the list settings? The company I am working for has given me admin access, but not complete site control. By default is it the generated columns when you create a list that are filterable? –  Tom Oct 15 '12 at 14:12
    
Nothing in search happens by default. See addition to answer –  Per Jakobsen Oct 15 '12 at 16:05
add comment

Tom,

I have written a blog for custom search in XSLTListViewWebPart, the list I am using is External List but same filters and javascript may be applied to any Custom List as well...

Please go through this blog

It is a custom solution and not use any Core Search Result Web Part..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.