Skip to content

Commit

Permalink
adding info modal to fulltext search #43
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Apr 21, 2024
1 parent 31b502d commit 57d82aa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
23 changes: 23 additions & 0 deletions archiv/templates/archiv/partials/info_modal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class="modal" id="searchInfoModal" tabindex="-1" aria-labelledby="searchInfoModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Search information</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>With this search, the fields "Short Description", "Facts", "Decision", "Commentary", "Additional Information" and "Parties" of a decision can be searched together. In order to keep the search efficient, the corresponding fields have been indexed. For this index, the individual texts are normalised back to their original forms. This also applies to the search term entered. Such a search index also allows more complex search queries such as:
<ul>
<li><strong>Phrase search</strong>: Terms in inverted commas are searched for together: "medical records".</li>
<li><strong>medical records</strong> finds all documents in which either <em>medical</em> or <em>recods</em> appears</li>
<li>A <strong>*</strong> at the end of a search term serves as a wildcard. <em>share*</em> also finds entries with <em>shareholder</em>, for example.</li>
</ul>
</p>
<p>For information: Displaying many hits as so called <em>Keywords in context (KWIC)</em> like e.g. <span class="text-nowrap bg-warning border-warning rounded border-5">example</span> can take some time. It is therefore advisable to narrow down the search results using additional filter options. </p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
9 changes: 5 additions & 4 deletions archiv/templates/archiv/partials/search_form.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<div class="container">
<form method="get" action="{% url 'archiv:courtdecission_browse' %}">
<div class="input-group mt-5">
<input type="text" class="form-control" placeholder="start typing your search term, e.g. 'Liability'" aria-label="start typing your search term, e.g. 'Liability'" aria-describedby="basic-addon2" {% if query_string %} value="{{ query_string }}" {% endif %} required name="ft_search">
<span class="input-group-text" title="Click for information about the search" data-bs-toggle="modal" data-bs-target="#searchInfoModal"><i class="bi bi-info-circle" role="button"></i></span>

<input type="text" class="form-control" placeholder="start typing your search term, e.g. 'Liability'"
aria-label="start typing your search term, e.g. 'Liability'" aria-describedby="basic-addon2" {% if query_string %} value="{{ query_string }}" {% endif %} required name="ft_search">
<button class="btn btn-block btn-lg btn-primary" type="submit" id="basic-addon2">Search</span>
</div>

</form>
</div>



1 change: 1 addition & 0 deletions webpage/templates/webpage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<h1 class="text-center">{% projects_metadata 'title' %}</h1>
<h2 class="text-center">{% lorem 10 w %}</h2>
{% include "archiv/partials/search_form.html" %}
{% include 'archiv/partials/info_modal.html' %}

{% endblock %}

0 comments on commit 57d82aa

Please sign in to comment.