Searching#
Searching allows to change content displayed on main articles list.
Basic search#
Basic search is displayed by default and allows to use graphical user interface to perform basic queries. Basic search interface is intentionally limitied to few most often used options.
Unread only button - when this button is selected (which it is by default), archived entries will not be displayed. When it is pressed off, both archived and unarchived entries are displayed.
Date selector - allows to see only entries published before / after yesterday, 2 days ago, a week ago or 2 weeks ago.
Tag selector - allows to see entries tagged with specific tag. Multiple tags are alternated (joined with conjunction OR), i.e. if entry is tagged with any of the provided tags, it will be on the results list.
Advanced search#
Advanced search allow to perform much wider range of queries, but they require you to write queries by hand. At the moment, there is no autocompletion support.
Table below contains list of fields and possible lookups. Fields and lookups are separated by double underscore: field__lookup
. Default lookup method, exact
, can be skipped. Value for lookup is specified after equals sign: field=value
. Some lookup methods can take in multiple arguments - they are separated by comma. Multiple query parameters are joined with ampersand: field1=value&field2=value
. See Examples below.
Lookup semantics are generally the same as in Django. See Django documentation on field lookups for details. Special lookup method not
is logical negation - it will match everything except specified value.
Fields and lookups#
Field |
Lookup methods |
Notes |
---|---|---|
|
|
Boolean field that takes |
|
|
|
|
|
|
|
|
Estimated time needed to read article, in minutes. Seconds are expressed as fraction of minute, e.g. 1 minute 30 seconds is |
|
|
Part of article that you have read, as fraction between 0 and 1. Half of article is |
|
|
Publication time as specified by source feed. It will fall back automatically to last updated time if publication time is not specified by source feed. |
|
|
Publication time as specified by source feed. Many feeds skip this field, and some broken feeds also change it when entry is updated. You almost certainly want to use |
|
|
Last updated time as specified by source feed. Most content is never updated, so it is often the same as |
|
|
Time when entry was added to Kustosz database. When you add new channel, all entries will have the same |
|
|
Time when entry was last updated in Kustosz database. You almost certainly want to use |
|
|
May be a list. Refers to tags of entries. |
|
Boolean field that takes |
|
|
|
May be a list. Uses internal id of channels. |
|
|
May be a list. Refers to tags of channels. |
|
Boolean field that takes |
Examples#
Entries published in a year 2022:
published_time__gte=2022-01-01T00:00:00&published_time__lte=2022-12-31T23:59:59
Entries with title that contain the word “test”, case insensitive:
title__icontains=test
Entries published in a year 2022 with title that contains the word “test”, case insensitive:
published_time__gte=2022-01-01T00:00:00&published_time__lte=2022-12-31T23:59:59&title__icontains=test
Entries with title that starts with the phrase “The quick brown fox”, case sensitive (note space is not escaped or put in quotes):
title__startswith=The quick brown fox
All entries, except these tagged with tag “slug” or “snail” (this includes entries that are not tagged at all):
entry_tags__not=slug,snail
Entries coming from three specific channels:
channel=5,10,15
Entries coming from channels that are not tagged (entries themselves may be tagged):
channel_has_tags=false