Skip to main content
Participant
January 22, 2024
Answered

Custom Metadata field max 511 characters but the Caption can be 3000+?

  • January 22, 2024
  • 1 reply
  • 351 views

Hi all,

Just started extending LR Classic with my own plugin for additional metadata.
I bumped into the limitation that a custom string field cannot be more than 511 characters.
Just to be sure: there is no way around that boundary. Correct?
J
ust because you can, I experimented with the standard Caption field. That can hold 3000+ characters. Anyone ran into problems populating that field to such a level?

For those wondering what the use case is... I want to store the description of an image exactly how I add it to the image on e.g. a stockphoto site. And that in 4 languages... Nothing fancy but apperently too much for what the SDK allows...

Thanks!
Ed

This topic has been closed for replies.
Correct answer johnrellis

I've observed that if you declare a custom field as searchable, e.g. 

    {id = "searchableLandmarks",
     title = "Searchable Landmarks",
     dataType = "string", 
     browsable = false,
     searchable = true,
     readOnly = false},

then the field is limited to 511 characters. But if "searchable" is false, then no limit is imposed. I've tested values of length 100K on my LR 13.1 / Mac OS, and it works reasonably smoothly.  At length 1M, LR seems to store the value properly in the field, though the UI chokes and takes a couple minutes to display the Metadata panel, spinning the beach ball. That's typical of LR's UI components, which often choke on very large contents.

 

My Any Vision plugin can generate custom fields of more than 511 characters, so it maintains two fields, e.g.  Landmarks and Searchable Landmarks.  Landmarks contains the entire field value, while Searchable Landmarks contains one occurrence of each of the least frequently occurring words in Landmarks. (LR search generally ignores the order and co-occurrence of words when searching, so this doesn't sacrifice much search functionality.)

1 reply

johnrellis
johnrellisCorrect answer
Legend
January 22, 2024

I've observed that if you declare a custom field as searchable, e.g. 

    {id = "searchableLandmarks",
     title = "Searchable Landmarks",
     dataType = "string", 
     browsable = false,
     searchable = true,
     readOnly = false},

then the field is limited to 511 characters. But if "searchable" is false, then no limit is imposed. I've tested values of length 100K on my LR 13.1 / Mac OS, and it works reasonably smoothly.  At length 1M, LR seems to store the value properly in the field, though the UI chokes and takes a couple minutes to display the Metadata panel, spinning the beach ball. That's typical of LR's UI components, which often choke on very large contents.

 

My Any Vision plugin can generate custom fields of more than 511 characters, so it maintains two fields, e.g.  Landmarks and Searchable Landmarks.  Landmarks contains the entire field value, while Searchable Landmarks contains one occurrence of each of the least frequently occurring words in Landmarks. (LR search generally ignores the order and co-occurrence of words when searching, so this doesn't sacrifice much search functionality.)

Participant
January 22, 2024

Thanks John,
That boolean for searchable never crossed my mind as being the limiter.
Just copied from the sample that came with the SDK. Knowing the answer... it is documented in the manual.
My bad.