Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2017-10-18 15:15:41

rsamco
Member
From: Bend, Oregon
Registered: 2012-12-20
Posts: 177
Website

Search returning wrong album

I just migrated from CE4 to BL and search results are a little wonky. My understanding is that searches are based on image keywords, file names & captions, and album titles. I am searching on a word and the results show correctly matching images, but the found album is wrong. It is actually a peer album of the one which should be returned (i.e., the incorrectly matched album is in the album set with the album that should match).

The website is http://rick.samcos.com, the search is for the word "garnet", and the album that should be found is titled "Garnet Lake" in the album set http://rick.samcos.com/galleries/j-2013/2-Ritter-Range/. Instead the incorrectly found album is the peer album "Iceberg Lake" which doesn't have "garnet" in its title, body text, or any of its images' captions or keywords.

I have republished the entire album set's metadata without effect.

How can I further diagnose this problem?


Rick

Offline

#2 2017-10-18 15:36:00

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Search returning wrong album

There is one image that has Garnet in the image title and is part of the Iceberg Lake gallery: http://rick.samcos.com/galleries/j-2013 … 64915-1037. So it is correct that this album is shown. But it is strange that the Garnet album is not found. The Favorites albums should be shown as well since it has images from Garnet Lake. This is something for Ben to look at.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#3 2017-10-18 20:16:25

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Search returning wrong album

Hi Rick, I can't think of an explanation for Garnet Lake not appearing in the search results.  Can you email me the file backlight/data/publisher/master.sq3 so that I can try and work out what's going on?

Offline

#4 2017-10-18 21:16:08

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Search returning wrong album

Also check that albums which should be returning results (Favorites, for instance) aren't set to be hidden from search


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2017-10-19 01:43:08

rsamco
Member
From: Bend, Oregon
Registered: 2012-12-20
Posts: 177
Website

Re: Search returning wrong album

Thanks, Daniel, for discovering the one image with erroneous "garnet" caption -- it's been edited and that image is no longer in the search results (and therefore its "Iceberg Lake" album no longer appears in search results either).

Rod, I double-checked that the "Garnet Lake" album does NOT have "hide from search" checked.

Ben, I should point out that there are lots of other search result anomalies -- the "garnet" one is just one easy-to-describe example.  I've mailed you a link to the master.sq3 file (30MB) so that you can download it. BTW, I am half way through the process of republishing the metadata for all albums in my database (since it didn't come across as part of migration and the GoDaddy DOS "bug" makes republishing a slow process). In other words, my database won't be stable for another day or two.

Last edited by rsamco (2017-10-19 02:04:25)


Rick

Offline

#6 2017-10-19 06:35:53

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Search returning wrong album

Hi Rick, thanks for the database file.  I've run it on my test site, and found that Garnet Lake also isn't showing on my side.  The album is being returned in the initial search results, but removed in subsequent filtering.  In my case, it's only removed because the physical directory doesn't exist under the galleries/ directory.  That's expected, since I don't have a copy of your galleries directory.  Why that filtering is happening on your server is a mystery.

I can't think of anything else to check here.  The only way to progress would be to see what's happening on your server.  Can you provide me with an FTP login so that I can try and work out what's going on?

Offline

#7 2017-10-19 06:48:05

rsamco
Member
From: Bend, Oregon
Registered: 2012-12-20
Posts: 177
Website

Re: Search returning wrong album

Ben, just created an ftp account for you & emailed you login credentials.


Rick

Offline

#8 2017-10-19 18:47:50

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Search returning wrong album

Hi Rick, thanks for the FTP access.  I've found and fixed the problem on your site.

This was caused by a bug in Publisher.  There are two ways that Albums can be added to the search results:

1. The album matches the search criteria
2. The album includes one or more photos that match the search criteria

The former type did not have the path on disk set properly, so that when the search results filtered out albums that weren't found on disk, they were being removed.  "Garnet Lake" is an album that fits this criteria.

I've put in a fix on your site, in file backlight/publisher/application/models/SearchResult.php.  Future updates to Backlight will include this fix, so you won't need to worry about keeping a copy of that file.

---

A more detailed explanation below, which includes more information that you probably want to know: 

While the above describes what's happening, the underlying reason was a little different. 
There are two types of Albums in the search results.  The Albums that are the search results themselves, that do not include the paths, and the Albums used to find paths, that include the paths.  The bug was that the filtering was done on the former.  It just happened that Album results associated with Photos had been taken from the set of Albums that included paths, so that these types were passing the filter while Album results not associated with Photos did not include the paths and so did not pass the filter test.  The fix was to make sure the filtering was always performed using the set of Albums with paths, which works as expected for both the Album results not associated with Photo results and the Album results associated with Photos. 

Edit: An additional finding is that Album matches during an Album search take precedence over Album matches during a Photo search.  The latter are abandoned if the Albums matched in the Photo search were already found in the Album search.  The bug affected Albums that were either matched in the album search or matched in both  the Album and Photo search.  Only Albums that were matched in the Photos search but not the Albums search would appear in the list.

Offline

#9 2017-10-19 23:56:50

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Search returning wrong album

Hi Ben,

Image http://rick.samcos.com/galleries/j-2013 … 8505-7-HDR has Garnet in the name and is part of the Garnet album. Following your explanation, this album should have shown anyway. Just wondering...


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#10 2017-10-20 00:14:10

rsamco
Member
From: Bend, Oregon
Registered: 2012-12-20
Posts: 177
Website

Re: Search returning wrong album

Thanks, Ben! But I'm with Daniel in that the explanation of the bug doesn't seem quite right.


Rick

Offline

#11 2017-10-20 05:19:54

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Search returning wrong album

Good catch.  I've delved further and updated my post, above.

Offline

#12 2017-10-20 06:14:35

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Search returning wrong album

Ben wrote:

Good catch.  I've delved further and updated my post, above.

Cool! Now everything makes sense! Thanks!


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

Board footer

Powered by FluxBB