Dataview, correct syntax for textsearch in files

Hi there,
I try to get a simple MOC / search result list
via dataview.
Task: Give me all files which contain the string “wachstum”.

What I resolved:

  1. Give me all files with “Wachstum” in the filename
LIST
WHERE contains(file.name, "Wachstum") 

or 2) Give me all files with Hashtag “Wachstum”

LIST
FROM #Wachstum 
SORT file.name ASC 

But the string “Wachstum” in the content of my files I don’t get.

Thanks for every hint.

You can’t search on the body of the notes with dataview, unless you only write all your notes with bullet points?
It may be possible to do this with a dataviewjs block, but it’s really more complex.
However, you can do it with a native search like this:

```query
"Wachtsum"
```

Ah - thank you very much.
This is an approximation, sometimes better than my goal (in the sense that not only the file names are listed, but also the text passages in the respective files),
sometimes worse (in the sense that usually a clickable list of file names would be clearer).

You write, I can’t use dataview for searches in the content of files. When I use the dataview list for Hashtags used in the files (see above), I really don’t search in the contents?

Strange:
The dataview-list for Hashtag #Wachstum is working how expected, this query not (nothing happens):

query 
tag:#Wachstum 

What’s happening?

See this thread:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.