Use cases:
Searching only content of pdf files (assuming it ever gets moved to a separate slot).
- Right now content from the file page is mixed up with content from the file, resulting in a mess,e.g. search for ' " Academia argentina " muestran los primeros 5' in commons will find https://commons.wikimedia.org/wiki/File:Reporte_de_proyecto_-_AAL_(2018).pdf, with the snippet confusingly including a mix of content.
Exclude text from structured data:
Currently searching for "P180" in commons finds (c:Special:Search/P180 ) stuff from a different slot that isn't even included in the page source nor any of its templates.
Suggested solution:
A keyword to exclude or include slots, e,g, "slot:wikitext", "slot:filedata", "slot:structured/ mediainfo".
Currently, insource serves as a reasonable workaround, but will fail in cases where the content come from a template, for instance in the P180 case above, one could try doing something like ' "P180" -insource:P180' or ; 'Academia argentina muestran los primeros 5 -insource:"Academia argentina muestran los primeros 5" ' . But that would exclude pages that include the search string in both wikitext and file contents.