locked
Getting Lightswitch to interact with search service RRS feed

  • Question

  • I'm building a new application using LightSwitch (my first time using the technology) that needs to support some fairly powerful search features. Seperately I've build a search service (using ElasticSearch) that can be queried extremely quickly ( <50ms ) which is hosted on Azure Cloud. The apps I had build for it before just had to make a REST call to the search service which returned a json object containing the results.

    I would like to find a way to allow lightswitch our LightSwitch application to utilize this service, but the data options I have seen supported (RIA and OData) seem to simply wrap the data in Entity Framework entities and then use Entity Framework to perform any searches, and that just lacks the speed and power necessary for our application. I don't mind wrapping the returned lists with Entity Framework, but I need the ability to let the service do the actual searching.

    Is there a way to interact with an external restful service in LightSwitch, and just load the returned list?

    Update: I'm going to have to support both Desktop and HTML eventually, but Desktop is the more immediate concern.


    Tuesday, February 4, 2014 9:29 PM

Answers

  • You do not specify if you are using the Desk Top or HTML client.

    If you are using the DT client you can approach your needs purely from a Silverlight perspective to pull data from a REST based service and wrap the results with you own custom control data grid. 

    You can embed your control into any screen which would work well for Read-Only search results sets as you describe.  If your data has relationship to your LightSwitch data via way of a PKey you could implement a deep linking approach to launch related screens.

    I have implemented Full Text search queries using a similar search approach which combined Full Text search results from SQL as well as SharePoint.

    Here is a hybrid example which implemented an approach to acquire loosely related data within a custom LS Shell. Note that the Data Grid within the center view is not a LightSwitch generated artifact, but the links within each row launched into a related LS screen. 

    Cheers

    John

     


    Johnny Larue, http://www.softlandingcanada.com


    Wednesday, February 5, 2014 12:37 PM

All replies

  • Hi,

    You may try using API for Lightswitch Server Interaction: http://blogs.msdn.com/b/lightswitch/archive/2012/11/19/a-new-api-for-lightswitch-server-interaction-the-serverapplicationcontext.aspx

    Hope it helps.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 5, 2014 10:59 AM
  • You do not specify if you are using the Desk Top or HTML client.

    If you are using the DT client you can approach your needs purely from a Silverlight perspective to pull data from a REST based service and wrap the results with you own custom control data grid. 

    You can embed your control into any screen which would work well for Read-Only search results sets as you describe.  If your data has relationship to your LightSwitch data via way of a PKey you could implement a deep linking approach to launch related screens.

    I have implemented Full Text search queries using a similar search approach which combined Full Text search results from SQL as well as SharePoint.

    Here is a hybrid example which implemented an approach to acquire loosely related data within a custom LS Shell. Note that the Data Grid within the center view is not a LightSwitch generated artifact, but the links within each row launched into a related LS screen. 

    Cheers

    John

     


    Johnny Larue, http://www.softlandingcanada.com


    Wednesday, February 5, 2014 12:37 PM
  • Desktop for now, with HTML as a secondary goal.
    Saturday, February 8, 2014 8:44 PM