Similar search

From Rodovid Engine

Jump to: navigation, search

Contents

[edit] Goal

The main goal of similar searching during import and adding new person to db is a checking for double, triple and more records..... So when some false similar found it is not very bad. But when similar not found - it is very bad.

[edit] Import order

Take a first not imported person .
while ( person not imported ) {
    if ( isset(person.father) and (person.father not imported) ) {
        person = person.father;
        continue;
    }
    if ( isset(person.mother) and (person.mother not imported) ) {
        person = person.mother;
        continue;
    }
    if ( person.father and/or person.mother ) {
        if ( exists not imported family(father,mother) ) {
             import family(father,mother);
             continue;
        }
        if ( (exists not imported child(father,mother)) and (child not equal to person) ) {
             import child(father,mother);
             continue;
        }
    }
    import person;
    person = next;
}

[edit] Definitions

  1. geditem - gedcom record into gedcom file.
  2. person - record into rodovid db.
  3. imported - geditem in user cache that was imported or assigned to person.
  4. gedinproc - geditem that is in current process

[edit] Current similar search

[edit] possible spouses (HW)

If geditem has a family. Script look throw all imported geditems for spouses of gedinproc. Similars are all person-spouses of found imported geditems.

[edit] brother by father (FaCh)

All children of imported father.

[edit] brother by mother (MoCh)

All children of imported mother.

[edit] similar refnums (REFN)

All persons that have *refnums = refnums of geditem

[edit] full name (all names) (FNE)

If list of names and list of surnames are equal.

[edit] name and surname (SA)

All persons that have one of the name words same as geditem have AND one of the surname words as geditem have. (surname prefixes are exluded). Also here added additional check if geditem birthyear is known: - difference between person birthyear and geditem birthyear must be less then 5 or person birthyear is unknown.

Personal tools
Джерельна довідка за населеним пунктом