Hello, It's hard to get into the problem. but you probably want to have dismax on child level: q={!parent ...}{!edismax qf='childF1 childF2' v=$chq}&chq=foo bar It's usually broken because child query might match parents which is not allowed. Thus, it's probably can solved by adding +type:child into chq. IIRC edismax supports lucene syntax.
On Thu, Mar 16, 2017 at 4:47 PM, Jan Nekuda <jan.nek...@gmail.com> wrote: > Hi, > I have a question for which I wasn't able to find a good solution. > I have this structure of documents > > A > |\ > | \ > B \ > \ > C > \ > \ > \ > D > > Document type A has fields id_number, date_from, date_to > Document type C has fields first_name, surname, birthdate > Document type D AND B has fields street_name, house_number, city > > > I want to find *all parents with block join and edismax*. > The problem is that I have found that possible is find children by parent, > or parent by children. > *I want to find parent by values in parent and in children*. I want to use > edismax with all fields from all documents (id_number, date_from, date_to, > has fields first_name, surname, birthdate,street_name, house_number, city). > I want to write *Hynek* AND *Brojova* AND 14 and I expect that it returns > document A because it found Hynek in surname, Brojova in street and 14 in > house number. > This is easy with {!parent which=type:A} > the problem is, that I'm not able to find by condition 789 AND *Brojova* > where 789 is id_number from type A and Brojova is Street from D. > > In short I need to find all parents of tree (parent and childern) in which > are matched all the word which i send to condition > > > My only solution is to make root type X. Then A will be its child. Then I > can use {!parent which=type:X}. > Than this will work: > > http://localhost:8983/solr/demo/select?q=*:*&fq={!parent > which=type:X}brojova*&fq={!parent which=type:X}16&wt=json& > indent=true&defType=edismax&qf=id_number date_from date_to has fields > first_name surname birthdate street_name house_number city&stopwords=true& > lowercaseOperators=true > > > But I believe it can be solved much better. > > X > | > A > |\ > | \ > B \ > \ > C > \ > \ > \ > D > > > Thanks for your help > Jan > -- Sincerely yours Mikhail Khludnev