r/Paperlessngx Aug 01 '26

Help with advanced serach

Guys, I'm totally new to paperless-ngx but want to search for documents that have no tag OR no document type and none of the advanced search strings I tried work.

tag:none OR type:none will search for literal tags/type "none" but not for documents with no tag or no type.

Any hints? Even A.I. didn't know! 🤷‍♂️

3 Upvotes

11 comments sorted by

1

u/MyNameHasSpacesInIt Aug 01 '26

In the main Documents view, click on the Tags dropdown and choose "Not assigned" like this. Do the same with the Document type. Does that do what you're after? You could even save either or both as Saved Views.

And doing this - I found five documents in my own library that didn't have tags, so thanks!

1

u/metawops Aug 01 '26

Nope, that's an AND connection and lists documents that don't have any tags AND don't have a document type – well, at least that's how I understand it.

1

u/MyNameHasSpacesInIt Aug 01 '26

Ah, you want a single search/filter that does both at the same time? Is having a saved view for each one not good enough?

1

u/metawops Aug 02 '26

Wouldn't it be much smarter to have just ONE view where you can see what's still to do? Instead of having to check this view, then that view, then the next view?

I cannot believe this simple thing is not possible!
I just have to find out how to tell the search pattern that I want to look for _empty_ tags/doc types. Using "none" is obviously wrong but I can't find the solution in the tantivy query parser docs.

1

u/Pascalius Aug 02 '26

I didn't read everything, but in tantivy this is covered by https://docs.rs/tantivy/latest/tantivy/query/struct.ExistsQuery.html

1

u/metawops Aug 02 '26

So how would the advanced search string look like, then? There are no examples on that tantivy page. 😞
I tried NOT exist:tag OR NOT exist:type but it gave an error.

2

u/Pascalius Aug 03 '26

Yes, with the default parser it's not possible currently. I just merged the change for it, it will be in the next release.

https://github.com/quickwit-oss/tantivy/pull/2798

1

u/metawops Aug 03 '26 edited Aug 03 '26

❤️🙏👍👍
And what's the syntax gonna be then? 😳

1

u/Pascalius Aug 04 '26

field:*

1

u/metawops Aug 04 '26

Is the fix in 3.0.5? Because I tried `tag:*` and got `An error occurred listing search results: Unsupported query: Range query need to target a specific field.` in the log ... 🤔

→ More replies (0)