{% extends "layout.html" %} {% set current_page = "search" %} {% set title = "OD-Database - Search" %} {% block body %}
Search
{# Query #}
{# Size #}
File size
{# Date #}
File date
{# File extension #}
File extension
.
{# Fields #}
Search in
Display options
{# Sort order #}
{# Results per page #}
{# Search button #}
{% if show_captcha %} {% else %} {% endif %}
{% if results and results["hits"]["total"] > 0 %}
{{ results["hits"]["total"] }} result(s) in {{ results["took"] }}ms
{% for hit in results["hits"]["hits"] %} {% set src = hit["_source"] %} {% if "name" in hit["highlight"] %} {% set hl_name = hit["highlight"]["name"][0] %} {% elif "name.nGram" in hit["highlight"] %} {% set hl_name = hit["highlight"]["name.nGram"][0] %} {% else %} {% set hl_name = src["name"] %} {% endif %} {% set hl_path = hit["highlight"]["path"][0] if "path" in hit["highlight"] else src["path"] %} {# File size & date #} {% endfor %}
{% set category = get_mime(src["ext"]) %} {% set url = src["website_url"] + src["path"] + "/" + src["name"] + ("." if src["ext"] != "" else "") + src["ext"] %} {# Preview #} {% if category == "image" %} {% endif %} {# File name & link #} {{ hl_name |safe }}{{ ("." if src["ext"] != "" else "") + src["ext"] }} {# File type badge #} {% if category %} {{ src["ext"] }} {% endif %} {# File path #}
{{ src["website_url"] }}{{ hl_path|safe }}
{{ src["size"] | filesizeformat if src["size"] >= 0 else "?" }}
{{ src["mtime"] | date_format }}
{% if results["hits"]["total"] > (p + 1) * per_page %} {% endif %} {% if p > 0 %} {% endif %}
{% else %}

No results.

For better results:

  • Try checking the 'Match any word' box for a broader search.
  • Make sure you don't include the file extension in your query (Use the appropriate field to filter file types)
  • If you're searching for files in a particular website, use the website search page
{% endif %}
{% endblock body %}