Adium

Ticket #8320 (new defect)

Opened 2 years ago

Last modified 7 weeks ago

Spotlight returns no results for chat log search in Leopard

Reported by: vnoel Owned by: nobody
Milestone: Adium 1.4.x Component: Logging
Version: 1.1.4 Severity: major
Keywords: spotlight, leopard, search, chatlog Cc:
Patch Status:

Description

In Leopard, if you search for the contents of a chat log using the Spotlight menu, the correct result is not returned (i.e. the chat log does not appear).

If you use mdfind, however, the chatlog file is found correctly.

Apparently, Apple decided that whatever lies inside the user's library folder is out of bounds for the Spotlight search:  http://discussions.apple.com/thread.jspa?threadID=1201778&tstart=0

Of course, contacts from Addressbook and emails from Mail show up in the results, so there must be a way to work around this limitation (perhaps by specifying a folder as "searchable") except if those data types are hardcoded somehow. The stuff inside ~/Library/Caches/Metadata apparently IS searchable (I'm getting results searching for Bibdesk stuff).

Change History

  Changed 2 years ago by jas8522

  • milestone set to Adium X 1.1.5

follow-up: ↓ 3   Changed 2 years ago by evands

  • milestone changed from Adium X 1.1.5 to Waiting on Apple

If a link is made to the logs directory inside ~/Library/Caches/Metadata, does Spotlight follow it and index appropriately?

Pending a workaround, this should be milestoned 'waiting on apple' and a link to the radar for the issue added to the ticket.

in reply to: ↑ 2 ; follow-ups: ↓ 6 ↓ 9   Changed 2 years ago by vnoel

Replying to evands:

If a link is made to the logs directory inside ~/Library/Caches/Metadata, does Spotlight follow it and index appropriately?

Nope. Even copying a log folder or a chatlog file inside this folder does not work. Copying the log folder or a chatlog file inside the ~/Library folder does not work. But as soon as you move the folder on the desktop, results show up.

Please note that Spotlight actually indexes correctly chatlog files in all of these locations - it's just that the menu chooses not to display them because it does not like their location.

IMHO, there must be some kind of API to "tell" Spotlight that it is ok to return results from a given folder inside ~/Library, but what do I know. I've looked a bit at the ADC web documentation, but I just have a free account so my powers are limited :-)

  Changed 2 years ago by evands

Hm. But you're sure Bibdesk is getting results displayed from within that folder?

  Changed 2 years ago by troplin

What about moving the default location of the logs to the ~/Documents folder? Since these are not program logfiles that are only for debugging/troubleshooting but chat transscripts that are more like documents.

This would also make sense because people may also want to access them from finder. In my opinion you should only have to open ~/Libary to install stuff and delete preference files and so on, but not to access files frequently.

Also many other programs (e.g. Colloquy, Snak) have their transscrpipt folders in ~/Documents.

in reply to: ↑ 3 ; follow-up: ↓ 7   Changed 2 years ago by cheungpat

Replying to vnoel:

IMHO, there must be some kind of API to "tell" Spotlight that it is ok to return results from a given folder inside ~/Library, but what do I know. I've looked a bit at the ADC web documentation, but I just have a free account so my powers are limited :-)

You can  write a Spotlight Importer to help Spotlight indexes chatlogs. If you look inside /System/Library/Spotlight you will see there are a bunch of importers provided by the system, one of them being vCard.mdimporter which enable contacts indexing.

in reply to: ↑ 6   Changed 2 years ago by evands

Replying to cheungpat:

Replying to vnoel:

IMHO, there must be some kind of API to "tell" Spotlight that it is ok to return results from a given folder inside ~/Library, but what do I know. I've looked a bit at the ADC web documentation, but I just have a free account so my powers are limited :-)

You can  write a Spotlight Importer to help Spotlight indexes chatlogs. If you look inside /System/Library/Spotlight you will see there are a bunch of importers provided by the system, one of them being vCard.mdimporter which enable contacts indexing.

Adium already has a Spotlight Importer which ships with it and works great on 10.4. As mentioned above, mdls shows that spotlight is indexing the chatlog files; the spotlight interface is simply filtering out the results from ~/Library/*

  Changed 2 years ago by troplin

imho it is a good decision from apple to prevent searches in ~/Library. Searching the library makes only sense for programmers and not users. Consequence is that chatlogs should be saved into ~/Documents and ~/Library is meant for files used by the program itself and not by the user.

in reply to: ↑ 3   Changed 2 years ago by vnoel

As a follow-up to vnoel, I should point out that I'm now getting different results - moving the Logs folder in ~/Library/Caches/Metadata, Spotlight searches return results from the chatlog files. So it seems like the right fix. It is unclear to me why it didn't work the last time, but I'd like it if someone else could try it out and confirm.

As an aside, Voodoopad, like Bibdesk, has moved Spotlight-related stuff in ~/Library/Caches/Metadata for 10.5 :  http://flyingmeat.com/download/latest/voodoopadreleasenotes.html (see release notes for 3.2.3). HTH.

  Changed 2 years ago by evands

We definitely should not put logs under Caches.

  Changed 2 years ago by chimerical

Being able to move the default location of the logs to ~/Documents would make sense. iChat places its logs there too.

follow-up: ↓ 13   Changed 2 years ago by willtisdale

There is a way to show all files in a spotlight search, the only limitation is the search has to be performed from a Finder window.

 http://www.macworld.com/article/60711/2007/10/spotsyssearch.html

in reply to: ↑ 12   Changed 2 years ago by vnoel

Replying to willtisdale:

There is a way to show all files in a spotlight search, the only limitation is the search has to be performed from a Finder window.

IMHO, a user should not have to search for "system files" in order to search his/her chat logs.

  Changed 2 years ago by willtisdale

Well, I know that. ;-) I was simply saying it is _possible_ to do, that's all. There probably should be an option to move the logs though.

follow-up: ↓ 16   Changed 2 years ago by aragost

I agree with evands: logs should definitely not go under caches (time machine would ignore them!); Nor they should be put in the library: they're not support files, they're user-created content (and the ichat example confirms this), and as such they should go in the library

in reply to: ↑ 15   Changed 2 years ago by aragost

Replying to aragost:

I agree with evands: logs should definitely not go under caches (time machine would ignore them!); Nor they should be put in the library: they're not support files, they're user-created content (and the ichat example confirms this), and as such they should go in the library

...in the documents folder, i meant -_-

  Changed 22 months ago by djmori

in reply to: ↑ description   Changed 21 months ago by aaulick

Why is this ticket "waiting on apple"? I don't think apple is going to change anything to make it work.

I just spent an hour trying to find a conversation, where I didn't remember which program I used to have the conversation, before finally realizing that spotlight just doesn't show Adium chats. I think that's a common use case, this is a big deal at least for me, and moving the log location seems very easy.

IMO the issue of moving the logs to some other default location where they will be reported by spotlight, is a bug fix that is separate and more important than the feature request of providing a GUI to let the user pick their own arbitrary location.

  Changed 20 months ago by evands

Yeah, I agree... we need to change our logs location.

in reply to: ↑ description   Changed 19 months ago by kiil

Please change the milestone from: "Waiting on Apple" to something more suitable such as "Needs feedback from users" or even beter "Adium 1.4" . This ticket has been around now for 10 months and a fix should be quite simple in that chat "protocols" (notice I used the word protocols and not "Logs") could be stored with-in the users document folder as the case is with iChat.

  Changed 16 months ago by jokke

I agree the location should be changed to allow Spotlight to find the logs. In general I dislike applications putting files in my Documents folder, but even Apple does it and it seems to be the best solution to the problem.

If everyone agrees this is the way forward, could someone please fix this soon? I have no commit permissions so cannot do it myself.

  Changed 15 months ago by boredzo

  • milestone changed from Waiting on Apple to Good idea for "later"

jokke: You don't need commit permission; you can contribute a patch.

  Changed 15 months ago by proton

  • milestone changed from Good idea for "later" to Adium 1.3.x

Mac OS X 10.5.6 will now show files from ~/Library in Spotlight. This may require a reindex of those files (I'm not 100% sure on that part).

If we do require a reindex code to automatically do this on 10.5.6 can be added etc etc.

  Changed 15 months ago by evands

  • status changed from new to closed
  • resolution set to fixed

(In [25671]) Reimport all spotlight logs on first launch of Adium 1.3.3 or greater to allow mac OS X 10.5.6 to be sure to have an index of our logs. Fixes #8320

  Changed 15 months ago by Robby

  • milestone changed from Adium 1.3.x to Adium 1.3.3

  Changed 15 months ago by evands

(In [25672]) Merged [25671]: Reimport all spotlight logs on first launch of Adium 1.3.3 or greater to allow mac OS X 10.5.6 to be sure to have an index of our logs. Fixes #8320

  Changed 15 months ago by aragost

I'm still not getting results (10.5.6 and 1.3.3b1). Am I missing something?

  Changed 12 months ago by dharris

I'm also not getting results (10.5.6 and 1.3.3). Any other special incantations required? In what category will the results be presented?

FWIW, I never ran Adium under Tiger (on this machine). Could there be a configuration issue relating to older installations having set up some other spotlight configuration option?

  Changed 12 months ago by Robby

  • status changed from closed to reopened
  • resolution fixed deleted
  • milestone changed from Adium 1.3.3 to Adium 1.3.4

Okay, this needs investigating. Thanks for pointing out that it's still broken.

  Changed 11 months ago by evands

  • milestone changed from Adium 1.3.4 to Adium 1.4

I don't want to mess with this on a point release, but I think moving the chat logs to ~/Documents/Adium for 1.4 is the way to be done with this.

  Changed 11 months ago by zacw

  • severity changed from normal to major

  Changed 10 months ago by zacw

I say go for it Evan. Ignore the detractors, it's how every other chat program behaves. It's how it's expected, and we're confusing.

  Changed 10 months ago by dharris

I suppose it's possible that Snow Leopard (OS X 10.6) will provide a new way to handle this. (Disclaimer: I'm just speculating here, I'm not in the developer beta program for this and have no concrete information on this)

However, it will be at least a month until it's released and more like 6-12 months before most Adium users are using it. I say move logs to ~/Documents

  Changed 10 months ago by zacw

  • milestone changed from Adium 1.4 to Adium 1.4.x

  Changed 10 months ago by mchmarny

Sorry, I am coming kind of late into this but wasn't there a way in previous versions to specify the location of your transcripts?

follow-ups: ↓ 39 ↓ 40   Changed 10 months ago by vnoel

FWIW, a way to keep the chat logs in the Library and *still* have the logs show up in Spotlight searches would be to create a Spotlight-friendly searchable index of the logs in the ~/Library/Caches/Metadata folder. Searching through spotlight would show results from the cached-indexed-logs, and opening one (from the spotlight menu or wherever) would open Adium which would then focus the search in the "real" chat log.

Apparently this process is required for any app that handles large monolithic files (e.g. Apple Mail or Bibdesk) since it is the only way to present spotlight search results with a level of detail below the file-level. See e.g.  http://lists.apple.com/archives/spotlight-dev/2006/Dec/msg00002.html for a reference concerning Bibdesk.

Of course since Adium saves each chat log in a separate file, this process *should* not be required. But it's an alternate solution, and it might be moderately easy technically speaking, i.e. create duplicates of the chat logs from their usual location in Library to the Caches/Medata location. Both copies would have to stay in sync though, which is a PITA. Dunno, might be easier to just move everything to ~/Documents....

follow-up: ↓ 38   Changed 9 months ago by squirrelsewer

+1 for storing it in docs - would also help for backups

in reply to: ↑ 37   Changed 9 months ago by David Munch

Replying to squirrelsewer:

+1 for storing it in docs - would also help for backups

Most people would probably also backup ~/Library/Application Support/Adium/ anyway, so not really..

in reply to: ↑ 36   Changed 7 months ago by simurgh

Replying to vnoel:

Of course since Adium saves each chat log in a separate file, this process *should* not be required. But it's an alternate solution, and it might be moderately easy technically speaking, i.e. create duplicates of the chat logs from their usual location in Library to the Caches/Medata location. Both copies would have to stay in sync though, which is a PITA. Dunno, might be easier to just move everything to ~/Documents....

I'd rather have the logs moved somewhere else than have duplicates sitting on my system. I also know several people who frequently delete their cache folder to free up space.

in reply to: ↑ 36   Changed 7 months ago by aragost

Replying to vnoel:

FWIW, a way to keep the chat logs in the Library and *still* have the logs show up in Spotlight searches would be to create a Spotlight-friendly searchable index of the logs in the ~/Library/Caches/Metadata folder. Searching through spotlight would show results from the cached-indexed-logs, and opening one (from the spotlight menu or wherever) would open Adium which would then focus the search in the "real" chat log. Apparently this process is required for any app that handles large monolithic files (e.g. Apple Mail or Bibdesk) since it is the only way to present spotlight search results with a level of detail below the file-level. See e.g.  http://lists.apple.com/archives/spotlight-dev/2006/Dec/msg00002.html for a reference concerning Bibdesk. Of course since Adium saves each chat log in a separate file, this process *should* not be required. But it's an alternate solution, and it might be moderately easy technically speaking, i.e. create duplicates of the chat logs from their usual location in Library to the Caches/Medata location. Both copies would have to stay in sync though, which is a PITA. Dunno, might be easier to just move everything to ~/Documents....

This seems overly complicated to say the least. There is an already proposed solution (moving to ~/Documents/) which has no drawbacks - why is this ticket pushed back to more distant releases every time?

  Changed 6 months ago by aragost

Quick update: no results as well in Snow Leopard

  Changed 7 weeks ago by rmaunder

Can anyone give an update on this issue? I still see the problem with Adium 1.3.10 & Snow Leopard 10.6.2

mdfind shows the chat logs under ~/Library/Application Support/Adium 2.0/Users/Default/Logs/

Nothing shows up in a Spotlight search.

Is there a fix ever coming, or a recommended work around from the above suggestions?

Thanks

Note: See TracTickets for help on using tickets.