Synonym Lists

Discussion related to "Everything" 1.5.
Post Reply
void
Developer
Posts: 19863
Joined: Fri Oct 16, 2009 11:31 pm

Synonym Lists

Post by void »

Everything 1.5.0.1407a adds basic support for synonym lists.

To create a Synonym List:
  • Create a text file: Synonyms.txt in %APPDATA%\Everything
    (Synonyms-1.5a.txt for the alpha version)
  • Open this file in your text editor.
  • For each line, add a semicolon (;) delimited list of Synonyms.
  • For example:

    Code: Select all

    CO2;CO₂
    and;'n;&
    shared;sharing;share
    license;licence
    color;colour
    kansas;KA
    
  • Save changes to your Synonyms.txt
  • Exit Everything (File -> Exit)
  • Restart Everything.
Searching for
CO2
will now match filenames containing
CO2
or
CO₂

Searching for
and
will now match filenames containing
and
or
'n
or
&




Synonym lookup is case sensitive.
The lookup matches the whole word (not partial words)
CO2
will match
CO₂

However,
co2
will not match
CO₂




The Synonyms.txt format is CSV.
Use double quotes (") to escape ; or ,



You cannot substitute search modifiers or search functions.
substitution only occurs for normal searches (eg: doesn't apply to regex)

The following modifiers work with synonyms:
case:
diacritics:
path:
wholewords:
prefix:
suffix:
ignore-punctuation:
ignore-whitespace:

Synonyms are not supported with any other modifiers (regex:, whole:, etc..)

Modifiers to not apply to synonym lookup. Synonym lookup is always case sensitive.
Modifiers are applied after the synonym expansion.
case:CO2 => case:CO2 | case:CO₂



Synonyms can be used with functions, for example:
content:CO2



Use double quotes (
"
) to escape words you do not want replaced with synonym expansion.

For example, if you have the synonym:
dance;dancing

and you want to match filenames containing dancing (not necessarily dance), search for:
"dancing"
therube
Posts: 5719
Joined: Thu Sep 03, 2009 6:48 pm

Re: Synonym Lists

Post by therube »

(sort of a ramble...
i've not thought about content:)


so what was the original request? NO2 = no2 (fancily)...
(oh, co2, carbon dioxide vs. no2, nitrogen dioxide. had i used n2o, well that would have been funny)


Synonym Lists are -<instance> based.
(only noting cause i'd forgotten that, at first)

syn:, is my synonym for synonym


thoughts... maybe a "global" syn: table, in addition to <Instance-name>
based syn: table. so you could have a global, & then you could also
have syn: that are Instance based... that wouldn't make sense though,
would it? cause then you'd have to have the ability to exclude the
global table...

as is, syn: could be a (somewhat) replacement for grouping < group | ing >

having the ability to use; ww: case: nopath: <whatever they're called> would be nice

syn separator-char (seemingly) could be , or ; - though above only mentions ;
but, both , & ; are legal filename characters, so maybe it should be | ?

you might want a syn like < ; -) | wink >, which you cannot do, & is "invalid"
  • wink;;-)
    wink,;-)
an "invalid" syn: is IGNORED entirely when searched for - ALL results are returned
  • syn: wink,;-)
    search: wink
    result: ALL results are returned, as if you had not typed anything into the Searchbar
    also: nonetheless, these invalid "terms" are embolden
  • result: tWINKle tWINKle little star.mp3 & Wawusho Kubani - (Who Were You Talking to-).mp3


actually, in the /search/ you could limit things by using ww: or whatnot...
syn no2;claudia (.with. !PUNC enabled)
then in a search of ww:claudia it would find
prelude no2.mp3 & Putumayo - Coffee Lands - 02 - Soltarlo (Colombia) - Claudia Gomez.mp3
but would not find
Reign Ghost - Feat Lynda Squires - 01 - Long Day Journey No2 - 3.03.mp3
but not
00-the_black_keys-el_camino-2011.m3u
(probably not a good example, but no-2, even with !PUNC is not found by; ww:no2, where no2 is syn
- i have to revisit the CASE case too...
"Synonym lookup is case sensitive"... i've got to think about that...)

in any case, one may want only part of a search to be ww: & not the entirety
syn:
  • Arizona;AZ
    Kansas;KA
    Maryland;MD
so a search of ww:kansas
finds
  • 02 Ka Pya Chi.mp3
    03 - Procol Harum - The Devil Came From Kansas.mp3
but not
  • Melanie Safka - The saddest thing.mp3


(if a syn: could be ww:'d, ww:KA,
then what should a search of 'ww:KA' return?

would that be ww:ww:KA, which would be KA?

-

ww:kansas returns 'kansas'
noww:kansas returns both 'kansas' & arkansas
so...
noww: is the same as if you had not typed ww: at all...


syn: bomb,"wake up"
search: bomb
search: wake up
search: "wake up"


"quotes" are allowed
syn: badfinger;"sweet tu"
syn: winehouse;"wake up"
search: winehouse
finds: amy_winehouse-wake_up_alone.mp3 (winehouse)
finds: Amy Winehouse - Wake Up Alone.mp3 (winehouse, wake up)
finds: Amy Winehouse - wake-up-alone.mp3 (winehouse, wake-up)
search: "wake up" (with actual quotes)
finds: Amy Winehouse - Wake Up Alone.mp3 (winehouse, wake up)
finds: Amy Winehouse - wake-up-alone.mp3 (winehouse, wake-up)


syn: :: will cause anything that follows the :: to act as a REMARK
  • syn: timebomb::"wake up"
    - "wake up" is simply ignored in relationship to the /syn:/, though is found is a /search/
syn: ,, within a syn: will cause any syn: terms to be IGNORED in relationship to the /search/
syn: ;; within a syn: will cause any syn: terms to be IGNORED in relationship to the /search/
syn: ,; within a syn: will cause any syn: terms to be IGNORED in relationship to the /search/
syn: ;, within a syn: will cause any syn: terms to be IGNORED in relationship to the /search/
  • syn: starlight,,shipwreck
    search: starlight
    result: ALL files are found (including, Prince of the Starlight.mp3)
    search: shipwreck
    result: ALL files are found (including, The Great Shipwreck Of Life.mp3)
syn: "terms" - within a syn:, terms with a <space> will be treated as a literal
  • syn: wink:wake up
    search: wink
    result: Wake Up Alone.mp3
    - but not, The_Wake-Up_Bomb.mp3 (where otherwise codepoints would have found it)
syn: "quotes" - syn: "terms" can be "quoted" & are also treated as a literal (with actual quotes)
syn: "quoted terms" - will find all the term synonyms
or
syn: unquoted terms - will not find all term synonyms - unless the "Search" is "quoted", in which case it will
  • syn: wink:wake up
    search: wake up
    result: Wake Up Alone.mp3
    - but not, Twinkle Twinkle Little Star.mp3

    syn: wink:wake up
    search: "wake up"
    result: Wake Up Alone.mp3 & Twinkle Twinkle Little Star.mp3

    syn: wink:"wake up"
    search: "wake up"
    result: Wake Up Alone.mp3 & Twinkle Twinkle Little Star.mp3
syn: "invalid terms" - are ignored
  • syn: kansas;ww:KA;timebomb
    search: kansas
    result: Procol Harum - The Devil Came From Kansas.mp3 & Timebomb (Live - Jimmy Echo Vocal).mp3
    - but not Glenn Miller - iknoWWhy.mp3 nor Xenomania-KommerTillbaKA.mp3
---

as an aside, back around .1230a, i had a thought - which i never mentioned here:

SYN:

synonyms

some sort of temporary feature where you can set up "pairs"
<brasil | brazil>
if SYN: is enabled brasil also find brazil & vice versa

<grosse | groBe>

likewise, you should be able to assign a shortcut to a syn, so:
bz: <brasil | brazil>

so a search for: rainforest bz:
finds: rainforest <brasil | brazil>

heh.
i guess that's what BOOKMARKS are for!
guess i ought to see how that works ;-)

also, Can I set up a synonym for a search term?
void
Developer
Posts: 19863
Joined: Fri Oct 16, 2009 11:31 pm

Re: Synonym Lists

Post by void »

I have had plenty of requests for synonym support.

CO2
is essentially a search for:
CO2 | CO₂




CO2
already matches
CO₂
without synonym support.
It's only required if you match diacritics, which some languages prefer.



Synonym Lists are instance-based to keep things simple.
I would like to avoid merging synonym lists.
But maybe this could be added in a future release.


as is, syn: could be a (somewhat) replacement for grouping < group | ing >
It's rather limited, you cannot substitute complex searches.
Only simple words.

Use macros to make searches shorter.



The synonym list format is CSV.
Items can be delimited with
,
or
;

Use double quotes (") to escape , or ;

For example:

Code: Select all

wink;";-)"
You can also escape double quotes with double double quotes while in double quotes: (sorry, bit of a mouthful)

Code: Select all

quote;""""
quote
would then match
and



result: ALL results are returned, as if you had not typed anything into the Searchbar
I will add a rule that synonym words cannot be empty.
This will fix the ;; issues and the trailing ; matching all files.


syn no2;claudia (.with. !PUNC enabled)
Reign Ghost - Feat Lynda Squires - 01 - Long Day Journey No2 - 3.03.mp3
ww:claudia will find the above as it contains No2.
The synonym lookup is case sensitive, but the resulting search is not. (case:claudia would not find the file because it's essentially a case:claudia | case:no2 search)
ww:Claudia would not work because Claudia is not in the synonym list. -you could add it to your synonym list as: Claudia;claudia;no2

So you could have different synonym lookups for different case, eg:

Code: Select all

foo;bar
FOO;baz

(if a syn: could be ww:'d, ww:KA,
then what should a search of 'ww:KA' return?

would that be ww:ww:KA, which would be KA?
It would be
ww:ww:KA
which will match nothing. (the second ww: is treated literally)
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Synonym Lists

Post by tuska »

void wrote: Thu Mar 12, 2026 4:39 am Everything 1.5.0.1407a adds basic support for synonym lists.

Searching for ... will now match filenames ...
I find the “Synonym List” very useful!   :)

Would it be possible in the future to use this for file contents as well?
I would really appreciate that.
therube
Posts: 5719
Joined: Thu Sep 03, 2009 6:48 pm

Re: Synonym Lists

Post by therube »

Use double quotes (") to escape , or ;

wink;";-)"
If I remember correctly, the issue with that was, on the Search end, in order to match the synonym, your search had to include the quotes.

(without looking)

search: wink
result: twinkle twinkle.mp3 & 'you think you're funny ;-).png'

search: ;-)
result: 'you think you're funny ;-).png'

search: ";-)"
result: twinkle twinkle.mp3 & 'you think you're funny ;-).png'
void
Developer
Posts: 19863
Joined: Fri Oct 16, 2009 11:31 pm

Re: Synonym Lists

Post by void »

I find the “Synonym List” very useful! :)
Thank you for the feedback.
If the Synonym List is found to be useful, I will consider supplying localized defaults.


Would it be possible in the future to use this for file contents as well?
Yes, synonyms work with content: and other functions.
(edit: updated documentation above)


If I remember correctly, the issue with that was, on the Search end, in order to match the synonym, your search had to include the quotes.
The search does not need to match the quotes.
Using the synonym
wink;";-)"
and searching for
;-)
will match
wink
.
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Synonym Lists

Post by tuska »

void wrote: Wed Mar 25, 2026 12:01 am Yes, synonyms work with content: and other functions.
Hi,

The list of synonyms seems to have partially trouble handling German umlauts (öäüÖÄÜ) and special character (ß):

1.5.0.1407a (x64) -> Content -> [x] Index file content -> Include only files: ... *.ion; ...
Content in the hidden file “descript.ion”.

D:\zzz\descript.ion

Code: Select all

parent:D:\zzz content:Dateiausschlüsse		OK, found
parent:D:\zzz content:Dateiausschluesse		NOT found
D:\Daten\descript.ion

Code: Select all

parent:D:\Daten content:prüfen			OK, found
parent:D:\Daten content:pruefen			NOT found
C:\Everything\Synonyms.txt

Code: Select all

license;licence
color;colour
Ä;AE;Ae;ä;ae
Ö;OE;Oe;ö;oe
Ü;UE;Ue;ü;ue
ß;ss
 
2026-03-25_Synonym List_German umlauts (öäüÖÄÜ) and special character (ß).png
2026-03-25_Synonym List_German umlauts (öäüÖÄÜ) and special character (ß).png (42.78 KiB) Viewed 1660 times
 
Please check.
Thank you!
void
Developer
Posts: 19863
Joined: Fri Oct 16, 2009 11:31 pm

Re: Synonym Lists

Post by void »

Synonym lookup matches the whole word.

I have updated the documentation.

There's no Dateiausschlüsse or Dateiausschluesse in your synonym list.
You would have to add Dateiausschlüsse and Dateiausschluesse to your synonym list, for example:

Code: Select all

license;licence
color;colour
Dateiausschlüsse;Dateiausschluesse
When added, searching for:
content:Dateiausschluesse
would match files containing Dateiausschlüsse.

So matching ü with ue anywhere in a word is not really what the Synonym list is designed to do.
tuska
Posts: 1382
Joined: Thu Jul 13, 2017 9:14 am

Re: Synonym Lists

Post by tuska »

void wrote: Thu Mar 26, 2026 12:23 am Synonym lookup matches the whole word.
So matching ü with ue anywhere in a word is not really what the Synonym list is designed to do.
Ah, I see.

Thanks for the detailed explanation!
therube
Posts: 5719
Joined: Thu Sep 03, 2009 6:48 pm

Re: Synonym Lists

Post by therube »

Search: wink
  • syn: wink;;-)
    ;-) - 38 items
    wink - 0 items
  • syn: wink;";-)"
    - 68 items, both ;-) & wink
  • syn: wink,;-)
    - 374,236 items (IOW, it is a if no Search term was entered - both wink & ;-) are ignored)
  • syn: wink,";-)"
    - 68 items, both ;-) & wink


Search: ;-)
  • syn: wink;;-)
    ;-) - 38 items
    wink - 0 items
  • syn: wink;";-)"
    - 68 items, both ;-) & wink
  • syn: wink,;-)
    ;-) - 38 items
    wink - 0 items
    (note this is different from above, with a search term of 'wink')
  • syn: wink,";-)"
    - 68 items, both ;-) & wink
(in all cases, both wink, when it turned up, & ;-) are emboldened - & even in the ignored case
68 it the total number of items; 38 ;-) & 30 wink)
void
Developer
Posts: 19863
Joined: Fri Oct 16, 2009 11:31 pm

Re: Synonym Lists

Post by void »

Synonyms are no longer applied when quoted with Everything 1.5.0.1414b.

For example, if you have the synonym:
dance;dancing

and you want to match filenames containing dancing (not necessarily dance), search for:
"dancing"
Post Reply