Can you explain how the search treats underscores please

I’m trying to make sense of some search results. I have numerous keywords starting with Source_xxx indicating the source of the photos (generally where they have come from other people, or my parents photo albums or similar).

Suppose there were a keyword Source_David

If I search using the full string I get the correct results.
If I search using Source_Dav* I get nothing
If I search using Source_David* I get nothing
If I put a * at the front as in Source_Dav I get the correct results.

This isn’t quite intuitive.

That said, I have just found that the problem doesn’t seem to be happening for a keyword I created in Mylio… the clue being that it is the only (and therefore first) keyword in the list.

So if I put the full word in it matches, but if I add * it searches the whole keyword string and only finds the ones at the start of the list. I have to add * to the start to get the ones in the middle.

Think this could be easier :slight_smile:

Yes, something strange going on here with underscores - and single vs multiple keywords. Repro steps: pick 3 photos to test.

  • assign keyword “word_one” to all 3 photos
  • also assign keyword “word_two” to photo #3
  • enter Search query: word_o*
  • results: all 3 photos returned (as expected)
  • enter Search query: word_t*
  • results: nothing (expect to see photo #3 returned)

Note that if I use keywords “word-one” and “word-two” (hyphens rather than underscores) it works as expected.

Also note that it doesn’t seem to matter WHERE the keywords are entered. I tested entering them directly in Mylio, and also entering them in Lightroom Classic & forcing metadata save. Same results.

Summary: wildcard stem search for Keyword containing underscore character fails UNLESS that Keyword happens to be the FIRST keyword for that photo.

I hadn’t got as far as checking out the hyphens and helpful to know they work. I only recently changed all my keywords over to underscores in my current system and don’t particularly want to change them back so will have to live for a while with the need to search with a leading wildcard.

Thanks for reporting your results on this as well and hopefully it helps someone else avoid confusion !