none
Switching to non-default Search Provider in OOB Search WebParts

    Question

  • Our SharePoint environment is configured with SharePoint Search as the default search option and FAST Search as the secondary search option.

    We have a bunch of host header site collections which are dependent on SharePoint Search and have a few new ones which need to work against FAST. One of our tenants (site collection) have developed custom webparts to work against the FAST service proxy directly.

    Now for another new site collection, is there a way to switch the Search provider in the OOB webparts?

    Upon doing some research, I have found the SearchResultsBaseWebPart.DefaultSearchProvider property which is read-only. Does anoyone know of a way to set this property (maybe via reflection) so that it can works against a non-default Search provider?


    With Regards Shailen Sukul Entrepreneur/Software Architect/Developer/Consultant/Trainer (BSc | Mct | Mcpd (.Net 2/3.5/SharePoint2010) | Mcts (Sharepoint 2010/MOSS/WSS), Biztalk, Web, Win, Dist Apps) | Mcitp(SharePoint) | Mcsd.NET | Mcsd | Mcad) MSN | Skype | GTalk Id: shailensukul Twitter: http://twitter.com/shailensukul Website: http://sukul.org Blog: http://shailen.sukul.org/ http://www.linkedin.com/in/shailensukul





    • Edited by Shailen Sukul Thursday, May 03, 2012 7:41 PM
    • Moved by ScottC - MSFT Tuesday, May 08, 2012 6:12 PM Programming - Custom Webpart (From:SharePoint - Search (pre-SharePoint 2010))
    Thursday, May 03, 2012 7:18 PM

All replies

  • Hi,

    Thank you for your question. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience. Thank you for your understanding and support.

    Thanks,

    Entan Ming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contacttnmff@microsoft.com.


    Entan Ming

    TechNet Community Support

    Friday, May 04, 2012 1:55 AM
    Moderator
  • Hey Shailen,

    I am going to be looking into this issue to try and help you find a solution. I had a few preliminary questions for you.

    What version of SharePoint are you running?

    What patch level are you currently at?

    This will allow me to get a better idea of what you are trying to achieve and provide the most accurate solution possible.

    Thanks,

    ScottC - Microsoft SharePoint Support

    Friday, May 04, 2012 2:44 PM
  • Version: SharePoint 2010 Enterprise

    Patch Level: Dec 2011


    With Regards Shailen Sukul Entrepreneur/Software Architect/Developer/Consultant/Trainer (BSc | Mct | Mcpd (.Net 2/3.5/SharePoint2010) | Mcts (Sharepoint 2010/MOSS/WSS), Biztalk, Web, Win, Dist Apps) | Mcitp(SharePoint) | Mcsd.NET | Mcsd | Mcad) MSN | Skype | GTalk Id: shailensukul Twitter: http://twitter.com/shailensukul Website: http://sukul.org Blog: http://shailen.sukul.org/ http://www.linkedin.com/in/shailensukul

    Friday, May 04, 2012 3:48 PM
  • Hey Shailen,

    I have looked into the issue, and using reflection to change any value that is set as read-only in SharePoint is not a supported action. There is no OOB way to change the search provider of a web part.  I believe that this can be done in the code of the custom web part. SharePoint development is not my area of expertise. If you need assistance in performing that action within the custom code. I am going to move this post to the SharePoint development forum.

    Thanks,

    ScottC - Microsoft SharePoint Support


    Tuesday, May 08, 2012 6:11 PM
  • Thanks Scott. Please move this to the SP Dev forum.

    Regards Shailen Sukul

    Tuesday, May 08, 2012 6:15 PM
  • I think what you are looking for is the location property for the web part.  If that proves to not work in your environment, we probably need to see more of a repro on this.  It would also help to probably have a conversation on this as well to make sure we understand what you are looking at in your environment. 

    If you cannot find an answer from the forum directly, please visit the link below to see the various paid support options available that may better meet your needs. 

    Link:http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone



    Patrick Cole - MSFT

    Friday, May 18, 2012 5:49 PM