jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.37k stars 355 forks source link

Bug: Bad Request: /api/search/ #328

Closed wjhrdy closed 3 years ago

wjhrdy commented 3 years ago

Certain search terms are producing a bad request even though I know that the search term is in many of the documents. I get this message when I search for certain words:

Invalid search query: Document matching query does not exist.

When I look at the logs I see a bad request:

Bad Request: /api/search/

I haven't found a pattern yet.

My paperless-ng install has 333 documents.

wjhrdy commented 3 years ago

I also get the same error after scrolling down the page on some searches that did return results, I expect this is the endless scroll feature getting the same error.

wjhrdy commented 3 years ago

I see this is a dupilcate. sorry.

wjhrdy commented 3 years ago

Duplicate of #195

jonaswinkler commented 3 years ago

If you used the bulk edit feature on 0.9.9 to delete some documents, the search index was not updated propery, which in turn caused this error. Further updates fixed this, but the update did not change already existing indexes, causing this error to persist across versions.

Do the reindex as described there.

If the error occurs again, reopen and we need to figure out what causes this.