Person Search - Advanced filters too many records

Hello,
I use Advanced Person Search to add official Marriage Archives to any Marriages. The documents that I download from any official repositories are saved as Media in Citations, and my Sources all contain my initials (CF) in their names.
Example of one:


And so, when I use a Citation from such a Source, ‘‘Source text’’ contains CF

Because in large Cities there can be many Marriages, I would like to filter those with already one of my Citations associated. I built this Advanced Search

But it looks like this Search filters too many people, that is it also filters on ANY Marriage facts: Marriage ones, but also Marriage-Child and Marriage-Sibling :slightly_frowning_face:

If I use ‘‘text contains’’ instead of ‘‘text does not contain’’, it looks like the filter runs OK that is only people with such Marriage are listed and not also those with Marriage-Child or Marriage-Sibling containing CF.

I will do more tests to confirm and because I don’t understand why this two different results???

If you have any idea…

Not sure how you are seeing results for Marriage-Child or Marriage-Siblings. Those only show on the Edit Person screen when you have the option “Show relative events” checked. They are not facts for the person. They are only a fact for the couple it pertains to.

I have perhaps a beginning of an explanation: the too filtered People via Marriage are also those that have NO Marriage Citations at all. And so the logical result is somewhat true: Source doesn’t contain CF because it’s… empty. I think these empty results ought to be considered as good.

I will have to do another Search with Source doesn’t exist because I don’t find how to add both rules in the same Search using the wizard. It would be more easy in SQL native language, using Boolean and parenthesis.

Many thanks for your help !

I’m with Renee in that I don’t think Marriage-Child or Marriage-Sibling has anything to do with your problem because those are not real facts that are searchable.

That being said, there are lots of little gotcha’s in RM’s Advanced Search. One of the gotcha’s is the lack of parentheses and a NOT operator. But the larger gotcha is that you can’t make two different criteria be guaranteed to apply to the same fact. This only matters if a person has more than one fact of the same type, but Marriage is the exact type of fact that many people have more than one of. So you could have one Marriage fact that met your first two criteria and a second Marriage fact that met your third criteria and you would have a match.

Except that for the person in your screen capture, the person only has one Marriage fact. So I’m really puzzled about what’s going on with your search.

By adding the criterion “AND Marriage Source Exists” will work provided there is no more than one Marriage event per person with no more than one Marriage Source.

1 Like

Adding this criterion doesn’t change anything: when no Source exists, then ‘‘source text doesn’t contain’’ returns nothing

I hoped that implicit parenthesis would exist around AND(s) but unfortunately not :slightly_frowning_face:.

After the OR, I tested duplicating the 2 same first Marriage place rules AND a different source one, the ‘‘is empty’’ one and only the ‘‘is empty’’ is applied.

So for now, I will work with many simple rules and, when I will have time, I will take a look at these tools: SQLite Tools for RootsMagic : https://sqlitetoolsforrootsmagic.com/

If you are getting no returns with the addition of the 4th criterion and also got nil with just the three criteria, does that not indicate that you have no people with both a Marriage event and a Source whose Text lacks the string “CF”? That is, your people who have sourced Marriage events all have only one Source whose text field does contain “CF”.