Live Filter searches Comment column without wildcards

Features wanted...
Post Reply
c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Live Filter searches Comment column without wildcards

Post by c0thirty »

Would it be possible to add a mode to let the Live Filter search the Comment column as a set of words without requiring asterisks? e.g. currently, I can enter Comment:*gold* to display files that contain the word gold in the comment. I'd like to be able to enter just Comment:gold. More importantly, I'd like to be able to use multiple terms, such as Comment:gold black to display all files that contain both words in the comment, regardless of which order they appear. Currently Comment:*gold*black* and Comment:*black*gold* are two different searches.

An even nicer option would be the addition of a checkbox in the settings to allow the Live Filter to always search Comment in addition to filename without requiring typing out "Comment:", so I could simply enter gold black with boolean space enabled and it would filter to list all files that contain both words in either filename or comment.
I did see this thread from a couple years ago that suggested it might be interesting, but not currently possible...

admin
Site Admin
Posts: 65390
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Live Filter searches Comment column without wildcards

Post by admin »

All good ideas. :tup: The next beta will have everything. :beer:

admin
Site Admin
Posts: 65390
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Live Filter searches Comment column without wildcards

Post by admin »

Unsure how to handle Boolean terms when matching patterns across columns. Which one should it be?

Code: Select all

      If patterns are connected by Boolean operators the logic does not cross columns:
        Linda AND Paul  ->  match (*Linda* AND *Paul* in Name)
                               OR (*Linda* AND *Paul* in Comment)
                               OR (*Linda* AND *Paul* in Tags)

Code: Select all

      If patterns are connected by Boolean operators the logic can cross columns:
        Linda AND Paul  ->  match (*Linda* in Name OR Comment OR Tags)
                              AND (*Paul* in Name OR Comment OR Tags)

jupe
Posts: 3323
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Live Filter searches Comment column without wildcards

Post by jupe »

One of the changes made in relation to this topic has also had an affect on Color Filter matching, now Comment color filters are wildcard wrapped too, and don't seem to accept quotes to alter that behavior, if people had to update their filters.

admin
Site Admin
Posts: 65390
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Live Filter searches Comment column without wildcards

Post by admin »

Yes. They will accept quotes in the next beta.

IMO, since the Comment field typically contains longer text, it's more of a bug fix than an enhancement that partial matches now work without the need to add wildcards. So I can justify the change in behavior.

c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Re: Live Filter searches Comment column without wildcards

Post by c0thirty »

admin wrote: 28 Oct 2023 17:16 Unsure how to handle Boolean terms when matching patterns across columns. Which one should it be?
Hmm, possibly the latter? I think that would be the most painless "find what you're looking for" search engine-style behavior. Explicit column indicators could be used for more specificity?
photo grass sky tree finds anything with all four words present across filename/tag/comment columns.
photo Comment:grass sky tree finds filenames containing photo that also have comments containing grass, sky, and tree?

admin
Site Admin
Posts: 65390
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Live Filter searches Comment column without wildcards

Post by admin »

Yes, I went for the latter.

photo Comment:grass sky tree
Yes, it works like this.

c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Re: Live Filter searches Comment column without wildcards

Post by c0thirty »

Awesome! Thanks! :D

c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Re: Live Filter searches Comment column without wildcards

Post by c0thirty »

I wonder, should searching a quoted string match against the entire column, or just look for that contiguous string within it?
For example, consider two comments:
red hair, black coat
black hair, green coat

With space as boolean AND enabled, searching for black hair will return both because each contains black and hair. But searching for for "black hair" returns neither because the full columns contain additional text.
cmt:"black hair" and cmt:*black hair* don't seem to be matching anything in this test case either.
However, cmt:*black hair* does work when space as boolean AND is disabled. Actually, just plain black hair works in that case as well, of course.

admin
Site Admin
Posts: 65390
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Live Filter searches Comment column without wildcards

Post by admin »

I get you. But I don't want to give up the meaning of quotes as "exact match", so I came up with this:

Code: Select all

    * Configuration | Find and Filter | Filters & Type Ahead Find | Visual Filters and 
      Live Filter Box | Use space character for Boolean AND: Added an exception that seems 
      quite natural. Now, if the entire pattern is wrapped in asterisks, any spaces in the 
      pattern will not be considered a Boolean AND.
      If "Use space character for Boolean AND" is enabled then:
        cmt:black hair      //matches all items with "black" AND "hair" in the comment
        cmt:*black hair*    //matches all items with "black hair" in the comment
        cmt:"black hair"    //matches all items with the comment "black hair"
      The same logic works for Multi-Column Matching now, of course.

c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Re: Live Filter searches Comment column without wildcards

Post by c0thirty »

Can multiple asterisked terms be used somehow? e.g. *black hair* *red shirt* fails right now. Actually using paired asterisks with any additional terms or whitespace outside them seems to return no results.

admin
Site Admin
Posts: 65390
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Live Filter searches Comment column without wildcards

Post by admin »

No, that's asking too much of the parser. If you want this, you should turn off "Use space character for Boolean AND" and use full-form Boolean operators.

Post Reply