FROM : Gerriet M. Denkmann
DATE : Tue Jun 03 11:23:25 2008
On 3 Jun 2008, at 15:33, Hamish Allan wrote:
> On Tue, Jun 3, 2008 at 1:37 AM, Gerriet M. Denkmann
> <<email_removed>> wrote:
>
>> This one also works for me. Only it kind of works too well, finding
>> thousands of files.
>>
>> Another example: <kMDItemTextContent LIKE "Briggel Braggel"> finds
>> ".../Test.txt" which only contains the line: "Briggel and Braggel" .
>> But I really want only files which contain "Briggel Braggel" or
>> "the Briggel
>> Braggel of today".
>
> Are you using Tiger?
Yes, I am.
> Spotlight indexes on words in Tiger; phrase
> indexing began in Leopard -- the phrase must be enclosed within
> quotation marks, IIRC (i.e. @"%K LIKE \"%@\"")
string = <Briggel Braggel> (without the "<>")
predicateFormatContent = @"kMDItemTextContent like %@";
predicate = <kMDItemTextContent LIKE "Briggel Braggel">
finds "Briggel and Braggel". Bad
string = <"Briggel Braggel"> (Note: " part of string)
predicateFormatContent = @"kMDItemTextContent like %@";
predicate = <kMDItemTextContent LIKE "\"Briggel Braggel\"">
also finds "Briggel and Braggel". Bad
string = anything
predicateFormatContent = @"kMDItemTextContent like \"%@\""; or:
predicateFormatContent = @"kMDItemTextContent like \'%@\'"; or:
predicateFormatContent = @"kMDItemTextContent like '%@'";
predicate = <kMDItemTextContent LIKE "%@">
finds nothing. Also not good. (There are lots of files containing %@
though).
string = <'Briggel Braggel'> (Note: ' part of string)
predicateFormatContent = @"kMDItemTextContent like %@";
predicate = <kMDItemTextContent LIKE "'Briggel Braggel'">
finds nothing. Still bad.
Now I do not have any more ideas.
Anyone else? Finding a string containing blanks on Tiger?
Kind regards,
Gerriet.
DATE : Tue Jun 03 11:23:25 2008
On 3 Jun 2008, at 15:33, Hamish Allan wrote:
> On Tue, Jun 3, 2008 at 1:37 AM, Gerriet M. Denkmann
> <<email_removed>> wrote:
>
>> This one also works for me. Only it kind of works too well, finding
>> thousands of files.
>>
>> Another example: <kMDItemTextContent LIKE "Briggel Braggel"> finds
>> ".../Test.txt" which only contains the line: "Briggel and Braggel" .
>> But I really want only files which contain "Briggel Braggel" or
>> "the Briggel
>> Braggel of today".
>
> Are you using Tiger?
Yes, I am.
> Spotlight indexes on words in Tiger; phrase
> indexing began in Leopard -- the phrase must be enclosed within
> quotation marks, IIRC (i.e. @"%K LIKE \"%@\"")
string = <Briggel Braggel> (without the "<>")
predicateFormatContent = @"kMDItemTextContent like %@";
predicate = <kMDItemTextContent LIKE "Briggel Braggel">
finds "Briggel and Braggel". Bad
string = <"Briggel Braggel"> (Note: " part of string)
predicateFormatContent = @"kMDItemTextContent like %@";
predicate = <kMDItemTextContent LIKE "\"Briggel Braggel\"">
also finds "Briggel and Braggel". Bad
string = anything
predicateFormatContent = @"kMDItemTextContent like \"%@\""; or:
predicateFormatContent = @"kMDItemTextContent like \'%@\'"; or:
predicateFormatContent = @"kMDItemTextContent like '%@'";
predicate = <kMDItemTextContent LIKE "%@">
finds nothing. Also not good. (There are lots of files containing %@
though).
string = <'Briggel Braggel'> (Note: ' part of string)
predicateFormatContent = @"kMDItemTextContent like %@";
predicate = <kMDItemTextContent LIKE "'Briggel Braggel'">
finds nothing. Still bad.
Now I do not have any more ideas.
Anyone else? Finding a string containing blanks on Tiger?
Kind regards,
Gerriet.
| Related mails | Author | Date |
|---|---|---|
| Gerriet M. Denkman… | Jun 1, 16:17 | |
| stephen joseph but… | Jun 1, 17:24 | |
| Gerriet M. Denkman… | Jun 2, 04:10 | |
| stephen joseph but… | Jun 2, 07:20 | |
| Gerriet M. Denkman… | Jun 2, 18:08 | |
| stephen joseph but… | Jun 2, 22:30 | |
| Gerriet M. Denkman… | Jun 3, 02:37 | |
| stephen joseph but… | Jun 3, 04:59 | |
| Gerriet M. Denkman… | Jun 3, 10:18 | |
| Hamish Allan | Jun 3, 10:33 | |
| Gerriet M. Denkman… | Jun 3, 11:23 | |
| Jason Wiggins | Jun 3, 16:27 | |
| Hamish Allan | Jun 3, 17:16 |






Cocoa mail archive

