Search string convention [message #1380] |
Sat, 12 March 2022 12:39 |
MarioC
Messages: 1 Registered: March 2022
|
Junior Member |
|
|
I want to search for the proper name Ng. I thought that a search using the string " Ng " (with the spaces) would do the job, but even if I select the Matches the Foxtrot Query option I still get a load of ng fragments, so the list of items is far to big to look through.
In fact entering space Ng space, or ng with no space or Ng with no space all produce the same search result.
How can I specify a search string truly containing spaces and letter case-sensitive?
|
|
|
Re: Search string convention [message #1383 is a reply to message #1380] |
Fri, 18 March 2022 22:32 |
Atlas
Messages: 140 Registered: August 2009
|
Senior Member |
|
|
"Ng" is not long enough for Foxtrot Query. I think there's a minimum character length (the search string needs to be at least 3 or 4 characters I think). Use "Includes the exact string" instead. It's more resource intensive, but will do the job. Maybe the Foxtrot team has a better solution, but that's what I would try.
|
|
|
Re: Search string convention [message #1384 is a reply to message #1380] |
Sat, 19 March 2022 09:02 |
FoxTrot Engineering
Messages: 406 Registered: April 2020
|
Senior Member |
|
|
FoxTrot always searches for whole words only (except if you explicitly use a * wildcard at the beginning and/or ending of a word), so I am not sure what you mean by "get a load of ng fragments".
Well, there is an exception for filenames, when the have mixed lowercase and uppercase letters; for example, a file named [FilenameWithNoSpace.pdf] can be found when you search [filenamewithnospace], or [filename with no space]. It won't be found however if you search for [file name] in two words, as there is a lowercase [n], so Filename is only indexed as a whole word.
That being said, if you use either [includes all of the words], [includes consecutive words] or [matches the FoxTrot query], then FoxTrot will delimit the whole words contained in the search string, and search for these whole words. So it does not matter if you add extra spaces or punctuation before the first word, or after the last one, or between the words.
You can however use [includes the exact string] if you want to find a word preceded or followed by some specific punctuation characters, or if you care about accents or case. Note that this still searches for whole words only (and wildcards can't be used here as FoxTrot will search the * character instead). If you want to search for a partial word preceded or followed by some specific punctuation characters (for example, words starting with [@name] or with [#tag]), then you can use [then apply advanced filter] [contents] [contains the string]. For performance reasons, such query should be formulated like this: [contents] [includes all of the words] [name*], [then apply advanced filter] [contents] [contains the string] [@name].
EDIT: @name and #tag are bad examples, as since FoxTrot 7, @ and # are indexed as whole words, instead of being ignored… So you can search [contents] [includes consecutive words] [@name*]. The previous example still applies for other characters that are still not indexed, like punctuation characters.
Jérôme - FoxTrot Engineering
[Updated on: Sat, 19 March 2022 09:23] Report message to a moderator
|
|
|
Re: Search string convention [message #1396 is a reply to message #1384] |
Tue, 05 April 2022 06:48 |
Atlas
Messages: 140 Registered: August 2009
|
Senior Member |
|
|
I've tried searching for only two character strings like "Ng" using [matches the FoxTrot query], and it doesn't work as expected. The results will show all strings containing "ng", but not the whole word. The option [matches the FoxTrot query] seems to only delimit the whole words as expected only when the string is long, and two characters is too short. If this is not the expected behavior, then please provide fix in next update?
|
|
|
|
Re: Search string convention [message #1456 is a reply to message #1399] |
Wed, 15 June 2022 10:34 |
foosball
Messages: 3 Registered: April 2022
|
Junior Member |
|
|
I ran into a similar issue.
I want to search only for a file named "java" but typing "java" or [java] finds all files with extension .java too. I used the File Name filter setting. How do I only search for files named "java"?
|
|
|
Re: Search string convention [message #1457 is a reply to message #1456] |
Wed, 15 June 2022 11:03 |
FoxTrot Engineering
Messages: 406 Registered: April 2020
|
Senior Member |
|
|
To find an exact full filename (extension included):
[file name] [includes all of the words] [java]
[then apply advanced filter] [file name with extension] [is exactly the string] [ignore: -] [java]
Or to find an exact base filename, whatever the extension is (e.g. [java], [java.pdf], [java.java]):
[file name] [includes all of the words] [java]
[then apply advanced filter] [file name] [is exactly the string] [ignore: -] [java]
Or to ignore files with a .java extension (e.g. [java], [java.pdf], but NOT [foo.java] nor [foo.JAVA] nor [java.java]):
[file name] [includes all of the words] [java]
[then apply advanced filter] [extension] [is not exactly the string] [ignore: case] [java]
Note: you could use [all items of type] [any file or folder] instead of [file name] [includes all of the words] [java], but this will be much slower, because advanced filters are evaluated for each single file matching the search criteria.
Jérôme - FoxTrot Engineering
|
|
|