WIP hack in es as the provider for search results

real sketch. lots of stuff is still broken. But! you can
make elasticsearch q= style queries and it shows up properly.
only first page works; need to adapt pager to elasticsearch's "total-hits" thing.
This commit is contained in:
queue
2017-05-14 02:01:26 -06:00
parent d7d24ef49e
commit 3cbe2e4221
3 changed files with 56 additions and 12 deletions

View File

@@ -35,6 +35,10 @@ def mk_es(t):
"_type": "torrent",
"_index": "nyaav2",
"_source": {
# we're also indexing the id as a number so you can
# order by it. seems like this is just equivalent to
# order by created_time, but oh well
"id": t.id,
"display_name": t.display_name,
"created_time": t.created_time,
"updated_time": t.updated_time,