Just installed Tiger

CU

Platinum Member
Aug 14, 2000
2,415
51
91
Spotlight seems to only search for file that begin with, or follow a special character like . or - to find your files, thus causing it to not return everthing. I have a folder with several files named like this:
BCMW-12ss.pdf
BCRW-4cs.pdf
BCRW-24cs.pdf
If I search for pdf it returns all of them. If I search for BC it returns all of them. If I search fo 4 is returns the ones that are -4 put not -24. If I search cs it returns nothing. How is this better than before. It is faster now, but not corrrect.

Also I did a system wide search for c++, by just clicking on the spotlight icon and typing c++. I got back files that didn' have c++ in the name or even inside the file. What is spotlight doing? Is there still a basic search by filename only function in Tiger that works.
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
Also is there away to make spotlight take wildcards? ie. *.a would only return files that end in .a. As of now it return most of my harddrive. The find command in the terminal may become my best friend if I cannot get spotlight to return better results. I was so looking foward to using spotlight though. I do like the programmer's calculator. All though I got it into a bad state or something and it would give me an error during left shifts. Restarting the app didn't fix it either. It finally just started working again. Anand was write it still has some bugs. Atleast the company I work for bought it for me and a few other to test out before we deploy it everwhere and I didn't have to pay for it.
 

dallastigers

Junior Member
May 3, 2005
6
0
0
When I made a smart folder for certain files on the first menu (I think it defaulted to kind) I selected other and scrolled to name extension to select on files with a certain extension. There are many other search attributes under "other" that may help you out.
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
OK that works, but is so not exceptable. To make my first example to work I have click in the search bar on the finder window and type something, doesn't matter what. Then click the plus sign beside save. Change Kind or whatever it defaults to for you to other then scroll down and pick filename. Now type "cs" in the new blank spot. Then go back and remove what you typed in the search bar on the finder window. Than and only then will it return all the files that contain "cs" in the filename. Who cars how fast spotlight works after all those steps I could have found it by hand. Any other ideas? Thanks for help though.
 

Childs

Lifer
Jul 9, 2000
11,313
7
81
The search would work just like find. if you wanted to seach for .a use quotes ".a". By default every search is using wildcards unless you quote.
 

dallastigers

Junior Member
May 3, 2005
6
0
0
Nothing else now. I am kind of playing around with it and getting used to it myself. The only temporary solution may be to save your search once you get it like you want it as a smart folder and add it to the sidebar. If you select from the Finder file menu "new smart folder" you should not have to type anything in to get to the option menus.

I am disappointed because the selections do not work as well as with mail. The finder spotlight does not give you the option to select any or all attributes listed nor does it seem to give you "negative" choices like "and does not contain....". The smart mailboxes in Mail are much better to get what you want. The choices are like the rules in Panther.

I also need to find the beta of the CiscoVPN that works on Tiger and that has messed up me up with work, but I like Tiger better than Panther so I do not want to go back. I am just not as able to get things done as quickly as before.
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
Originally posted by: Childs
The search would work just like find. if you wanted to seach for .a use quotes ".a". By default every search is using wildcards unless you quote.

Actually it doesn't. If I enter "*cs*", *cs*, "cs", or cs in the finder window nothing is returned. If I do find . -iname "*cs*" from that same directory it returns all the files with "cs" in the filename.

Saving results as smart folders doesn't work for me either because I don't always do the same searches. I am very dissappointed in spotlight. The old find work for me. If I type "cs" in the finder window I got the files that contained "cs" in the filename.
 

Childs

Lifer
Jul 9, 2000
11,313
7
81
Originally posted by: CU
Originally posted by: Childs
The search would work just like find. if you wanted to seach for .a use quotes ".a". By default every search is using wildcards unless you quote.

Actually it doesn't. If I enter "*cs*", *cs*, "cs", or cs in the finder window nothing is returned. If I do find . -iname "*cs*" from that same directory it returns all the files with "cs" in the filename.

Saving results as smart folders doesn't work for me either because I don't always do the same searches. I am very dissappointed in spotlight. The old find work for me. If I type "cs" in the finder window I got the files that contained "cs" in the filename.

hmmm, I'm not sure why its not working for you, if I put "cs" in spotlight I find files named cs (cs.po and a directory called cs). Without the quotes, I find all files that have cs in the name (955 files) , as if I used wildcards in find. Now, when I try to use actual widlcards in spolight nothing comes up, and that behavior is correct because I have no "*cs*" files present. I've tried it on three different Tiger machines and the behavior is consistent.

Looking at your above example that seems to verify my findings, as just cs by itself is like use wildcards. The examples you did would be eqiuvilent to doing the following:

"*cs*": find . -name "\*cs\*"
*cs*: find . -name \*cs\*
"cs": find . -name cs
cs: find . -name *cs*
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
Yes but what if you have files named just like mine in my first example. It only seems to be looking for a match at the beginning of the filename or after special characters like . or -. It would find cs.po a directory named cs, but not BCRW-4cs.pdf. Also thanks for the links I will take a look at them.
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
While interesting the links only seem to talk about finding files based on what the files contain or meta data. I want plan find file based on filename. I cannot believe this is so hard. I have also reproduced my first test on another mac running tiger, so I know it is not something strange with just my mac.
 

Childs

Lifer
Jul 9, 2000
11,313
7
81
I created 3 files based on the names you gave and placed them in ~,/Volumes/EXTRADISK, and /tmp. Ran spotlight right after looking for BC, and only the one in the home directory came up. Tried looking for PDF, and some other variations and sure enough, only the one in the home directory came up. Then I was looking at the ADC docs and some of the command line metadata utilities, and did the search again it all of the came up. Going back to your OP, I search using just the number 4 and 1000's of files started amassing so I stopped it. Seached for pdf and they came up. So maybe if you just copied your files over try searching again. Also, try running mdimport -L to see if the PDF importer is listed. Spotlight should be using filenames, and metadata for the searches.
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
I originally did the search on a mounted network drive. However I have also done similar test on a local folder sitting on my desktop. What does BC mean? Searching for pdf seems to find them. My quess is because it follows the "." what I am starting to call a special character. Searching for 4 only finds the 4cs file not the 24cs file. My guess again is because the 4 in the 4cs file follows "-" (special character) but 4 in the 24cs file does not. Yeah don't search your HD only the folder where you put the test files. It seems to find all kindes of files even ones that don't seem to have anything to do with your search, see my c++ search example in my original post. As for the search results changing after a given time that is because it takes some time for spotlight to reindex you files, so if you create a file and then search for it may not appear. However my problem has lasted hours, so I don't think that is the problem. Also the files on my Desktop were there before I upgraded to Tiger and it indexs your files when you first start Tiger, so I know they are indexed. My wife is using my Powerbook now so I cannot test mdimport -L, but I will later.
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
I ran midimport -L and the PDF importer is listed. Although I am not sure what that proves. I could have made the extensions anything I wanted and got the same results.
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
For anyone who wants to test this here is a simple way to test it.
Start terminal.
mkdir ~/Desktop/test
cd ~/Desktop/test
touch BCMW-12ss.ewm
touch BCRW-4cs.ewm
touch BCRW-24cs.ewm
open .
Type 4 in the search bar of the finder window. Hit enter. Click on Folder "test" to only search this folder. BCRW-4cs.ewm is returned. Wrong, should include BCRW-24cs.ewm also.
Type BC in the search bar. Hit enter. All of them are returned. Correct.
Type cs in the search bar. Hit enter. None are returned. Wrong, BCRW-4cs.ewm and BCRW-24cs.ewm should be returned.
Type ewm in the search bar. HIt enter. All of them are returned. Correct.

Why does spotlight act like this? I changed the extension from pdf (like in my orignal post) to ewm to make sure a known file extension was not effecting the results. It was not by the way.
 

Childs

Lifer
Jul 9, 2000
11,313
7
81
Originally posted by: CU
I ran midimport -L and the PDF importer is listed. Although I am not sure what that proves. I could have made the extensions anything I wanted and got the same results.

This may prove that only certain files are indexed, and the search results are only for indexed files. Doing the mdimport -L shows you what spotlight is going to look for. You can also see this by looking at the spotlight pane in Systems Prefs. Since spotlight doesn't seem to catch all files, only certain types of files.

My results from your last test are actually different than yours. Right after creating the files and searching the directory I find nothing at all. I waited a bit and still nothing. I had to force a reindex, and then it partially worked. This is a serious regression, as simple file name searching does not work, for some reason its dependent on the location of the string in relation to other characters in the file name.

Since I can't trust the search results, I've actually decided to turn spotlight off. Time to write a GUI wrapper for "find".
 

CU

Platinum Member
Aug 14, 2000
2,415
51
91
Strange you found nothing at all. I guess spotlight could have indexed them a second before I searched for them. Indexing seems kindy strange anyway. How do you turn spotlight off and does that make the search bar work as it did in panther. This does seem like a big regression.