server/search: add MD5-based search
This commit is contained in:
parent
2bdb072296
commit
2dfd1c2192
2 changed files with 14 additions and 2 deletions
|
@ -83,9 +83,17 @@
|
||||||
<td>having given flag. <code><value></code> can be either <code>loop</code> or <code>sound</code>.</td>
|
<td>having given flag. <code><value></code> can be either <code>loop</code> or <code>sound</code>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>content-checksum</code></td>
|
<td><code>sha1</code></td>
|
||||||
<td>having given SHA1 checksum</td>
|
<td>having given SHA1 checksum</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>md5</code></td>
|
||||||
|
<td>having given MD5 checksum</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>content-checksum</code></td>
|
||||||
|
<td>alias of <code>sha1</code></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>file-size</code></td>
|
<td><code>file-size</code></td>
|
||||||
<td>having given file size (in bytes)</td>
|
<td>having given file size (in bytes)</td>
|
||||||
|
|
|
@ -274,9 +274,13 @@ class PostSearchConfig(BaseSearchConfig):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
["content-checksum"],
|
["content-checksum", "sha1"],
|
||||||
search_util.create_str_filter(model.Post.checksum),
|
search_util.create_str_filter(model.Post.checksum),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
["md5"],
|
||||||
|
search_util.create_str_filter(model.Post.checksum_md5),
|
||||||
|
),
|
||||||
(
|
(
|
||||||
["file-size"],
|
["file-size"],
|
||||||
search_util.create_num_filter(model.Post.file_size),
|
search_util.create_num_filter(model.Post.file_size),
|
||||||
|
|
Loading…
Reference in a new issue