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 a problem where a SharePoint 2010 keyword search executed from the UI, and a keyword search executed using Object Model returns two different set of results.

I want to know whether the OOTB search pads some extra filter conditions to the search query causing the differences in search results

Is there any way to check this?

Is there any way to 'profile' the search queries like you would profile a SQL query so that we can understand the differences in the query results?

share|improve this question
    
yes, possible, see my answer below. –  Ashish Patel Jul 20 '11 at 3:13
add comment

2 Answers 2

You can see a little by checking the URL:

http://[server]/[YourSearchResultPage].aspx?k=[YourKeyWord]&cs=[YourContentSource]&u=[YourSiteYouSearchedFrom]&r=[YourRefinement]

Even though is it not like profiling a SQL query it might make some things (like unwanted refinements) visible.

share|improve this answer
add comment

Yes, it is possible. Check Know CAML Queries executed by SharePoint server–CAML Profiling

INstead of Monitoring category you would have to watch "query" category under "SharePoint Server Search" area (or SharePoint Foundation Search if you are using SharePoint Foundation)

I tried it and it gives me results like:

Keywords:{task} Terms:{task} Props:{}
Keywords:{ site:"http://nbtest:5908/sites/var" } Terms:{} Props:{site:"http://nbtest:5908/sites/var" }
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.