# Default search in OE2

**URL:** https://discourse.orthanc-server.org/t/default-search-in-oe2/6421
**Category:** General
**Created:** [April 6, 2026, 11:45pm UTC](https://discourse.orthanc-server.org/t/default-search-in-oe2/6421 "2026-04-06T23:45:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ddrucker](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/d/da6949/32.png) [@ddrucker](https://discourse.orthanc-server.org/u/ddrucker)
#### Post date: [April 6, 2026, 11:45pm UTC](https://discourse.orthanc-server.org/t/default-search-in-oe2/6421/1 "2026-04-06T23:45:30Z")

</div>

Is there a way to have a default search in OE2? Having it empty by default is not very useful, but having it show all most-recent is slow. I’d love to be able to show today’s studies only.

---

<div class="post-metadata">

### Author: ![bcrickboom](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/b/e274bd/32.png) [@bcrickboom](https://discourse.orthanc-server.org/u/bcrickboom)
#### Post date: [April 7, 2026, 7:00am UTC](https://discourse.orthanc-server.org/t/default-search-in-oe2/6421/2 "2026-04-07T07:00:19Z")

</div>

1. open OE2 and bookmark the page
2. edit the bookmark and replace the url by the following JS:

```auto
javascript:(function() { var currentDate = new Date(); var formattedDate = currentDate.toISOString().slice(0, 10).replace(/-/g, ''); var url = "http://localhost:8042/ui/app/#/filtered-studies?StudyDate="%20+%20formattedDate;%20%20%20%20%20window.open(url,%20'_blank');%20})();

```

---

<div class="post-metadata">

### Author: ![ddrucker](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/d/da6949/32.png) [@ddrucker](https://discourse.orthanc-server.org/u/ddrucker)
#### Post date: [August 6, 2026, 2:00am UTC](https://discourse.orthanc-server.org/t/default-search-in-oe2/6421/3 "2026-08-06T02:00:57Z")

</div>

It would be really nice if the default search could be controlled by a configuration item. We have \>100k studies, and the default search is very slow.

We have many, many users. Telling them all to use a javascript bookmarklet is not a great solution.

Specifically, what I’d love is to be able to limit the initial search to, say, the last n days.

Daniel

---

<div class="post-metadata">

### Author: ![ddrucker](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/d/da6949/32.png) [@ddrucker](https://discourse.orthanc-server.org/u/ddrucker)
#### Post date: [August 6, 2026, 1:35pm UTC](https://discourse.orthanc-server.org/t/default-search-in-oe2/6421/4 "2026-08-06T13:35:45Z")

</div>

Ha, I figured out how to do this with no change to OE2 after all.

Since our Orthanc is behind a SAML proxy, all I had to do was tell the proxy to redirect after auth to the URL-containing-prefilled-search of my choice!
