Spotlight "boolean OR" search not working correctly

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
Philologist
Posts: 177
Joined: Fri Mar 20, 2015 9:17 am

Spotlight "boolean OR" search not working correctly

Post by Philologist »

On page 64 in the User Guide there is this boolean OR search example:
dog or cat — finds pdfs containing the words dog or cat
Now, if I understand this correctly, then this means that ALL pdfs in the default attachments folder (or subfolder) containing the words dog or cat will be found.

I have noticed that if I use "dog or cat" as a search criterion, only files with "dog" will be found. If I use the search criterion "cat or dog", then only files with "cat" will be found. In other words, only files with the *first* word will be found.

Is this a bug?
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Spotlight "boolean OR" search not working correctly

Post by Jon »

There has to be a reference attached to the pdf, of course, but it sounds like that's not the problem.

Spotlight has changed over the years with each new OS release. Bookends generally feeds the search you enter to Spotlight. Try using || (two pipes in a row) for OR. See if that works.

Jon
Sonny Software
Philologist
Posts: 177
Joined: Fri Mar 20, 2015 9:17 am

Re: Spotlight "boolean OR" search not working correctly

Post by Philologist »

Jon wrote:Try using || (two pipes in a row) for OR. See if that works.
If I do that, then NOTHING will be found.

Just to be sure I'm doing it right, I enclose a screenshot. The red arrow shows the field where I enter the search criteria.
Screen Shot 2015-05-21 at 21.07.39.png
Screen Shot 2015-05-21 at 21.07.39.png (46.73 KiB) Viewed 9951 times
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Spotlight "boolean OR" search not working correctly

Post by Jon »

That's correct. I just tried two "or'd" words in a search and it found the correct pdf and reference. I assume the Finder Spotlight finds your pdf with the same search (the one in the default attachments folder)? If not, you can rebuild the Spotlight index. If it does, send me your pdf and I'll take a look.

Jon
Sonny Software
Philologist
Posts: 177
Joined: Fri Mar 20, 2015 9:17 am

Re: Spotlight "boolean OR" search not working correctly

Post by Philologist »

Jon wrote:I just tried two "or'd" words in a search and it found the correct pdf and reference.
You talk about "pdf" in singular, so maybe I'm misunderstanding something after all.

What I'm trying to do is this:

Let's say I have two PDFs in my attachment folder. In one file the word "Adam" appears, and in the other "Eve" appears. Now I enter "Adam OR Eve" as a search criterion, and I expect Bookends to find *both* PDFs. Bookends finds only the PDF with "Adam" in it. If I enter "Eve OR Adam", then the PDF with "Eve" is found, but not the other.

If I do a Spotlight search in Finder, using the same search criterion, then Spotlight finds *both* PDFs instantaneously, which shows that the Spotlight index itself is not damaged.

It's getting very late now over here. I'll come back to you again to morrow.
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Spotlight "boolean OR" search not working correctly

Post by Jon »

Got it. I see the problem, it's fixed for the next update.

Jon
Sonny Software
isma
Posts: 44
Joined: Thu Mar 26, 2015 5:54 am

Re: Spotlight "boolean OR" search not working correctly

Post by isma »

Hello
I am encountering a similar problem with the version 12.5.8

For instance, when I perform the following search in bookends spotlight : "text mining", I have got 56 hits in my database
When I search for the nlp term, I have 32 hits
But when I'm trying "text mining" or nlp , I obtain 171 hits.

In addition if I'm entering the following: "nlp" or "text mining", there are not hits

isma
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Spotlight "boolean OR" search not working correctly

Post by Jon »

Rebuild your database and see if that helps.

If not, try to narrow this down to a simple example with two references and two pdfs. Then you can send them to me for testing (I can't test if dozens of references/pdfs).

Jon
Sonny Software

P.S. And if you send me small examples to test, please explain where you're doing this search (Find, smart group, live search, etc.). It matters.
isma
Posts: 44
Joined: Thu Mar 26, 2015 5:54 am

Re: Spotlight "boolean OR" search not working correctly

Post by isma »

Just to post the answer Jon gave me by email
Bookends can’t mix phrase searches (quoted) with other searches (i.e. boolean searches). You can search for phrases with quote marks, but only singly, not mixed with other searches.
Best
Isma
Post Reply