For user oriented search you could use a pattern matcher,
here is an example with the Jekejeke Prolog pattern matcher.
The "database"(*) is:
partner(i149,'Grand Duke','Vladimir Romanov',male,1847,f11).
partner(i150,'Grand Duke','Alexis Romanov',male,1850,f11).
partner(i151,'Grand Duke','Serge Alexandrovich Romanov',male,1857,f11).
partner(i152,'Grand Duke','Paul Alexandrovich Romanov',male,1860,f11).
partner(i153,'Grand Duke','George Alexandrovich Romanov',male,1871,f9).
partner(i154,'Grand Duchess','Xenia Romanov',female,1875,f9).
partner(i155,'Grand Duke','Michael Alexandrovich Romanov',male,1878,f9).
partner(i156,'Grand Duchess','Olga Alexandrovna Romanov',female,1882,f9).
partner(i157,'Grand Duchess','Marie Pavlovna',female,1854,f1270).
partner(i158,'Grand Duke','Cyril Vladimirovitch Romanov',male,1876,f47).
partner(i159,'Grand Duke','Boris Romanov',male,1877,f47).
partner(i160,'Grand Duke','Andrei Vladimirovich Romanov',male,1879,f47).
The you could do queries such as:
?- use_module(library(misc/text)).
% 1 consults and 0 unloads in 31 ms.
Yes
?- partner(K,_,N,_,_,_),
pattern_match(N, 'andrei', [boundary(word), ignore_case(true)]).
K = i160,
N = 'Andrei Vladimirovich Romanov'
?- partner(K,_,N,_,_,_),
pattern_match(N, 'vladi*', [boundary(word), ignore_case(true)]).
K = i149,
N = 'Vladimir Romanov' ;
K = i158,
N = 'Cyril Vladimirovitch Romanov' ;
K = i160,
N = 'Andrei Vladimirovich Romanov'
Taken from here:
https://de.wikipedia.org/wiki/GEDCOM
Example pattern matchers for Prolog systems are:
SWI-Prolog:
http://www.swi-prolog.org/pldoc/doc_for?object=section%28%27packages/pcre.html%27%29#re_match/3
Jekejeke Prolog:
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/05_run/10_docu/05_frequent/07_theories/21_misc/01_text.html
In case you have larger database you might need some inverted
search index and persistent storage. There exist search indexes
which can also support pattern matching.
For example an n-gram index can do it.