1 Reply Latest reply on Nov 3, 2015 5:31 PM by johnrellis

    Smat Collection search issue

    jurem22247600

      Hello,

       

      I have problems with the "contains words" filter in smart collections. For example, the combination "Any Searchable text" AND "contains words" is unable to distinguish between metadata entries "A1(21)" and "A1(98)".

       

      As far as I understand it, any set of continuous characters should be considered a word but at first it seems the parentheses make a difference and that it separates these into "A1" and "(98)" or A1 and "(21)". However, if I also add a "doesn't contain" and enter "A1(21)" or "(21)" or "21" it returns zero images which I guess has to be because these are probably present in some other metadata.

       

      I cannot only set the filter to work on the bits I want because the data is entered in several boxes some of which I am unable to choose as the criteria in a smart collection.

       

      I would appreciate i if someone could explain a bit more about how this feature works.

       

      Thank you!

        • 1. Re: Smat Collection search issue
          johnrellis Most Valuable Participant

          You've stumbled upon one of many long-standing bugs in LR's search. 

           

          First the workaround: Do "Any Searchable Text contains words a1 21" to match "A1(21)" but not "A1(98)".

           

          What's going on:  LR uses one rule for dividing the search string into "words" and different, inconsistent rule for dividing a field being searched.   In particular, LR takes the search pattern given to "contains words" and divides into words, using just space and comma as word separators -- anything between the spaces and commas constitutes a "word".  So when you do "contains words (68)", there is one search word, "(68)".  But then when LR examines a field to be searched, e.g. a caption, it breaks that field into words using a large number of punctuation characters, including "(" and ")".  So if the caption contains "a(68)", it gets broken into two words, "a" and "68", with the parentheses ignored.  Then it tries to match the search word "(68)" against the field words "a" and "68", which fails.