Hello, Dariusz. It should be something like q=+firstName:Adam +{!parent which=type:record v=$chq}&chq=+type:address +strdist('Shakespeare', address.street, edit) post exception if it doesn't work.
On Tue, Jan 16, 2018 at 1:39 AM, Dariusz Wojtas <dwoj...@gmail.com> wrote: > Hi, > > Is it possible to use the strdist() function to return distance on the > child document field? > Let's say I have: > > <doc> > <str name="id">1</str> > <str name="type">record</str> > <str name="firstName">Adam</str> > <doc> > <str name="id">A1</str> > <str name="type">address</str> > <str name="address.type">business</str> > <str name="address.street">Shakespeare</str> > </doc> > <doc> > <str name="id">A2</str> > <str name="type">address</str> > <str name="address.type">correspondence</str> > <str name="address.street">Baker Street</str> > </doc> > </doc> > > What I want to do is to search for documents: > type:record > firstName:Adam > and return max strdist('Shakespeare', address.street, edit) as the > resulting score? > > or > type:record > firstName:Adam > and return max strdist('Shakespeare', address.street, edit) of > "address.type:business" as the resulting score? > > I am trying with the {!parent} mode and {!function}, various combinations. > But I do not get what I'd expect. > > Best regards, > Dariusz Wojtas > -- Sincerely yours Mikhail Khludnev