Announcement

  •  » Beta testing
  •  » [resolved] Piwigo 14.1 New Search function - Issues with bad data

#1 2024-01-22 11:18:33

Michael High
Member
Co. Offaly, Ireland
2022-12-15
8

[resolved] Piwigo 14.1 New Search function - Issues with bad data

Hello Claire,

I am trying to follow up your request for feedback on the new search, but as I cannot find it, I can't to post a reply. So I am raising this minor issue as a new request.

I am finding the new search very useful for tracking down examples of poor data standards in my Lightroom catalogue. This screen shot shows the search dropdown bringing up the full set of choices, with the correct record count.

https://piwigo14.thehighs.org/upload/2024/01/22/20240122105802-9c74c735.png

However, the search will not return any records for the first two choices. I am guessing that either the search is trying to return any of the words in the string, rather than the full string, or that it takes exception to the '&' character.

Can something be done so that the search responds to the two valid suggestions?

Piwigo URL: https://piwigo14.thehighs.org

Offline

 

#2 2024-01-22 15:37:22

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13773

Re: [resolved] Piwigo 14.1 New Search function - Issues with bad data

I just made a test on another Piwigo and the "&" character does not seem to be a problem.

Offline

 

#3 2024-01-22 15:58:13

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13773

Re: [resolved] Piwigo 14.1 New Search function - Issues with bad data

Actually, when I look at the HTML source code of the page generated by Piwigo, I see :

Code:

        <select id="authors" placeholder="Type in a search term" name="authors[]" multiple>
          <option value="Michael &amp; Pauline High
26 Ballyv">Michael & Pauline High
26 Ballyv (2 photos)</option>
          <option value="Michael High
Alderborough">Michael High
Alderborough (7 photos)</option>
          <option value="Michael High">Michael High (602 photos)</option>
          <option value="Pauline High">Pauline High (187 photos)</option>
          <option value="Roy Totten">Roy Totten (1 photo)</option>
        </select>

What's interesting is that there seems to be a new line in the middle of the author name. If I select "Michael High Alderborough" I get no result. The "&" is not the problem. The problem is much more related to the new line. Piwigo is not designed to support "muliple lines author". As you described in your first post, the author has been imported from a metadata written by Lightroom.

[... a few minutes later...]

So I have tried to force an author with newlines:

Code:

update piwigo_images set author="you\nand\nme" where id=77;

And it works perfectly fine in the search engine. So let's make another test with "\r\n" as new line, and not only "\n".

Code:

update piwigo_images set author="me\r\nand\r\nyou" where id=78;

This time... I get the same behaviour as yours. So let's fix it. In your database, execute the following SQL command:

Code:

update piwigo_images set author=replace(author, "\r\n", ' ');
update piwigo_images set author=replace(author, "\n", ' ');

Offline

 

#4 2024-01-22 16:17:19

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13773

Re: [resolved] Piwigo 14.1 New Search function - Issues with bad data

Offline

 

#5 2024-01-23 11:04:40

Michael High
Member
Co. Offaly, Ireland
2022-12-15
8

Re: [resolved] Piwigo 14.1 New Search function - Issues with bad data

Thanks for the swift reply. I have been able to follow your update queries to fix my data and am pleased to report that the new search facility is now working fine.

All my digital cameras have allowed the metadata to be populated with multi-line text in the author field. This allowed me to confuse the use of the author and copyright fields. I am unlikely to be the only person who has done this in the past. I think that the way that Piwigo handles the author data is best practice. So might I suggest that the Synchronise process has your two update queries added. This would avoid the search on author process appearing to fail. New users, like myself, could then search out and fix their bad data.

Best wishes,

Michael

Offline

 

#6 2024-01-24 13:39:33

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13773

Re: [resolved] Piwigo 14.1 New Search function - Issues with bad data

Michael High wrote:

So might I suggest that the Synchronise process has your two update queries added. This would avoid the search on author process appearing to fail. New users, like myself, could then search out and fix their bad data.

That's exactly why I created issue #2093 (linked above)

Offline

 

#7 2024-01-25 08:44:25

Michael High
Member
Co. Offaly, Ireland
2022-12-15
8

Re: [resolved] Piwigo 14.1 New Search function - Issues with bad data

My apologies. I am new to this process and I did not see the significance of your [Github] post.

Offline

 
  •  » Beta testing
  •  » [resolved] Piwigo 14.1 New Search function - Issues with bad data

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact