Jazzと読書の日々

iPadを筆記具として使う方法を模索します

Obsidian Bases:historyにAND検索がつきました

御手数かけます。

AND検索

倉下さんのアイデアをお借りすることにしました。

filterでの絞り込みですよね。 TagLink.baseでも使っていて、こちらでも試行錯誤したのですが、 うまく絞り込めなくて悩んでいました。

なるほど、search側の数を見るわけか。

history.md

ということで修正版です。

Import Obsidian: history

---
search:
---
>[!info]- ![[banner.jpg]]
>[📒️](obsidian://new) [📅](obsidian://daily) [🗂️️](shareddocuments://)
>```dataview
>task where !completed group by file.link
>```
```base
filters:
  and:
    - if(this.search, list(this.search).filter((file.name+note.author+note.description).contains(value)).length == list(this.search).length, true)
formulas:
  progress: if(file.size>5000,"🟦️🟦️🟦️🟦️🟦️","🟩️".repeat((file.size/1000).ceil()))
  image: if(note.image, note.image, if(file.ext=="md", file.embeds[0], file.file))
  object: file.isLink()
views:
  - type: cards
    name: Inbox
    filters:
      and:
        - file.folder == "Inbox"
    order:
      - file.name
      - file.mtime
      - formula.progress
    sort:
      - property: file.mtime
        direction: DESC
    cardSize: 230
  - type: table
    name: journals
    filters:
      and:
        - file.folder == "journals"
        - file.name != file.folder
    order:
      - file.name
      - description
    sort:
      - property: file.name
        direction: DESC
    columnSize:
      file.name: 110
  - type: cards
    name: Clippings
    filters:
      and:
        - file.folder == "Clippings"
    order:
      - file.name
      - source
    sort:
      - property: file.mtime
        direction: DESC
    image: note.image
    imageAspectRatio: 0.45
  - type: cards
    name: assets
    filters:
      and:
        - file.folder == "assets"
    order: []
    sort:
      - property: file.mtime
        direction: DESC
    image: file.file
    imageAspectRatio: 0.65
  - type: cards
    name: All
    order:
      - file.name
      - file.mtime
    sort:
      - property: file.mtime
        direction: DESC
    image: formula.image
    imageAspectRatio: 0.5

```

searchプロパティのタイプは「リスト」にすること。

使い方

searchに複数のキーワードを設定できます。

おお、うまく絞り込めました。

searchをリスト型にすることで キーワードが個々に独立して管理しやすいですね。 「×」をタップして消せる。 クリアしやすい。

リスト形式にする方法

プロパティをタップすると「プロパティタイプ」が出ます。

この中の「リスト」をチェックしてください。

まとめ

AND検索が使えるとFinderに近づく。