Commit Graph

18 Commits

Author SHA1 Message Date
j dbf740e55e use .editorconfig 2018-06-19 08:33:26 +02:00
j 6fd8d2aef3 fix query for documents rightslevel 2017-11-08 18:00:30 +01:00
j f71240ac2c look in the right place, fixes #2989 2017-01-20 17:44:31 +01:00
j e1f35b1ec8 new documents section 2016-10-30 18:23:16 +01:00
j 3d95d7013a Merge remote-tracking branch 'wjt/2935-findDocuments-performance' 2016-06-30 15:43:09 +02:00
j e9863c238e always use get_operator, avoid case-insensitive match if possible 2016-06-30 11:28:09 +02:00
Will Thompson 8d25e3be78
findDocuments: improve entity query performance
When I implemented this in 9a4c24c, there were not many rows in
entity_documentproperties in the database here. Now that there are,
computing the document_document -> entity_documentproperties ->
entity_entity join and then filtering is really, really slow. Postgres
seems to materialize the whole join and then scan it.

If we get a set of matching document IDs for the entity query in a
subquery, and then just filter with IN on that, things are much faster:
scan entity_entity; in a nested loop, get the document_ids via
entity_documentproperties; hash this set; and then scan
document_document.

Searching for a single character, this brings the query from ~1.1s to
~400ms. Searching for a full word, ~800ms to 120ms

This condition is getting really ugly -- I am sorry!

References #2935
2016-06-28 16:33:01 +01:00
Will Thompson 9a4c24cdb4 Support searching documents by entities 2016-03-04 12:41:41 +00:00
Will Thompson 738a9282b4 Document: fix negating id queries 2016-03-04 12:41:41 +00:00
j 051a3578b4 inline django 1.9 version of ox.django 2016-02-20 10:41:23 +00:00
Will Thompson 47d8d67c3d Allow 'query' to be omitted from find*() (fixes #2883)
I hit this in findDocuments() so thought I'd fix them all.
2016-02-15 14:58:50 +00:00
j c6bd95050a typo 2014-11-20 12:41:41 +00:00
j 3232ce6989 rename Item.itemId to Item.public_id 2014-09-19 12:26:46 +00:00
j dada4cbf4c fix findDocuments by id 2014-01-17 13:14:40 +00:00
j d1014334be fix per item document description 2014-01-08 04:32:57 +00:00
j 388f4c9d74 add key=item support to findDocuments 2014-01-07 14:00:20 +00:00
j 0e55faca0d update documents backend 2014-01-07 11:05:10 +00:00
j 8da6badf4c rename files to documents and use media for media files 2013-05-27 10:13:59 +00:00