HI Mikhail. Sorry for all the confusion This is the original query which doesn't work q=PersonName:peter AND {!type=join from=DocPersonID to=PersonID fromIndex=document v='(*:* -DocType:pdf)' }
I figure out that negating outside the cross join query makes the trick for me. I take the negation out of the v='' and put in in the person collection part of the query. In that way I can exclude everyone. q=PersonName:peter AND (*:* - {!type=join from=DocPersonID to=PersonID fromIndex=document v='(DocType:pdf)' }) On 17 February 2016 at 12:13, Mikhail Khludnev <mkhlud...@griddynamics.com> wrote: > Sergo, > > Please provide more debug output, I want to see how query was parsed. > > On Tue, Feb 16, 2016 at 1:20 PM, Sergio García Maroto <marot...@gmail.com> > wrote: > > > My debugQuery=true returns related to the NOT: > > > > 0.06755901 = (MATCH) sum of: 0.06755901 = (MATCH) MatchAllDocsQuery, > > product of: 0.06755901 = queryNorm > > > > I tried changing v='(*:* -DocType:pdf)' to v='(-DocType:pdf)' > > and it worked. > > > > Anyone could explain the difference? > > > > Thanks > > Sergo > > > > > > On 15 February 2016 at 21:12, Mikhail Khludnev < > mkhlud...@griddynamics.com > > > > > wrote: > > > > > Hello Sergio, > > > > > > What debougQuery=true output does look like? > > > > > > On Mon, Feb 15, 2016 at 7:10 PM, marotosg <marot...@gmail.com> wrote: > > > > > > > Hi, > > > > > > > > I am trying to solve an issue when doing a search joining two > > collections > > > > and negating the cross core query. > > > > > > > > Let's say I have one collection person and another collection > documents > > > and > > > > I can join them using local param !join because I have PersonIDS in > > > > document > > > > collection. > > > > > > > > if my query is like below. Query executed against Person Core. I want > > to > > > > retrieve people with name Peter and not documents attached of type > pdf. > > > > > > > > q=PersonName:peter AND {!type=join from=DocPersonID to=PersonID > > > > fromIndex=document v='(*:* -DocType:pdf)' } > > > > > > > > If I have for person 1 called peter two documents one of type:pdf and > > > other > > > > one of type:word. > > > > Then this person will come back. > > > > > > > > Is there any way of excluding that person if any of the docs fulfill > > the > > > > NOT. > > > > > > > > Thanks > > > > Sergio > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > > > > http://lucene.472066.n3.nabble.com/join-and-NOT-together-tp4257411.html > > > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > -- > > > Sincerely yours > > > Mikhail Khludnev > > > Principal Engineer, > > > Grid Dynamics > > > > > > <http://www.griddynamics.com> > > > <mkhlud...@griddynamics.com> > > > > > > > > > -- > Sincerely yours > Mikhail Khludnev > Principal Engineer, > Grid Dynamics > > <http://www.griddynamics.com> > <mkhlud...@griddynamics.com> >