Searching in a list with one keyword across two columns

We have a document list with 2 columns. One is a text column and other is a lookup column

The requirement was that, user should be able to search across two columns, where the condition being, search should match with either of the column. The following url format works for this particualr scenario.

http://server/sites/site1/sitePages/DocumentSearchPage.aspx?k= &r=Column1:”query*” OR Column2:”query*”&cs=This List&u=http://server/sites/site1/library1

Note:

DocumentSearchPage.aspx has a Search Core Results webpart.

The parameer “k” is not required. But sometime without this parameter search result is blank. Hence “k” will have a empty character as string.

cs=This List is a query paramter which helps in searching a particular library. This depends on the parameter “u” explained in next line.

u=http://server/sites/site1/library1 is the library from which search result should come.


Leave a Reply

Your email address will not be published / Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.