0

Is it possible to change the refresh interval of a single "Search Result" - Webpart?

Currently it updates every 15 minutes. I've created a search result + display template which queries for a list of employees and their current status. If their status changes, the background color of their box changes too... but only after the described delay.

I've chosen to do it via search results, because the list is used in different sites and should be customized via display template.

0

Search results webpart, as the name indicates gets the data from the search index. Looks like your incremental crawl is set to 15 minutes. Meaning that the SharePoint search crawler is indexing any new and updated items every 15 minutes. Search results webpart can only show the changes when the index is updated. The incremental crawl schedule can be change via the Central Administration on the Search Service Application.

  • is there something similar to the search result webpart where I can still use display templates? – Thomas May 11 '16 at 10:53
  • Display templates are only for search related webparts. If you are displaying information from just one list, you could have a look whether you can use CSR (JSLink) to customize how your list of employees is displayed. JSLink can be configured on any list view to customize how fields are rendered. This should allow you to use a background depending on the employee status. Here you can find some useful examples: code.msdn.microsoft.com/office/… – Suleyman May 11 '16 at 11:43
  • Thanks for the interesting link. My problem is, that I even need parts of this list in different site collections. This list has a "team" column and on a different site collection there are the individual team sites which should display only their team members + their current status without delay or extra lists. – Thomas May 11 '16 at 11:49
  • An alternative for search would be to use REST/JSOM calls to get the data to be shown in team site collections. As long as the sitecollection are on the same domain you should have any trouble doing this (otherwise you need to have a look at sp requestexecutor). You can perform a REST/JSOM call filtering on team property to get member from your list. Have a look here for an example of how to get items with filtering and reading the properties of the items: msdn.microsoft.com/en-us/library/office/… – Suleyman May 15 '16 at 16:02
0

I believe you can use JavaScript/jQuery to reload your page. Add a Script Editor Web Part on the page and use something like:

//adjust the number to suit your need
     $(document).ready(function() {
                setInterval("location.reload(true)", 300000);
            });   
  • This would only reload the page, not directly the queried content of the webpart – Thomas May 11 '16 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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