Sankalp,
would you mind to post debugQuery=on output, without it it's hard to get
what's the problem?

However, it's worth to mention that Andrey's suggestion seems really
promising.


On Tue, Feb 17, 2015 at 8:19 PM, Sankalp Gupta <sankalp.gu...@snapdeal.com>
wrote:

> Hi Mikhail,
>
> It won't solve my problem.
> For ex:
> Suppose my docs are like this:
> <doc>
>     <field name="userid>1</field>
>     <doc>
>        <field name="address">city1</field>
>     </doc>
>     <doc>
>        <field name="address">city2</field>
>     </doc>
> </doc>
>
> <doc>
>     <field name="userid>2</field>
>     <doc>
>        <field name="address">city2</field>
>     </doc>
>     <doc>
>        <field name="address">city3</field>
>     </doc>
> </doc>
>
> Now if I want* a query to return me all the users not having any address*
> related to *city1* (i.e. only userid=2 should be in the result)and then if
> i query:
> *q={!parent which=userid:*}*:* -address:city1*
> This will return me two* results i.e.** userid=2 and userid=1 *(as userid=1
> is also having a child whose address is city2)  , *desired output was
> userid=2 only.*
>
> On Tue, Feb 17, 2015 at 8:12 PM, Mikhail Khludnev <
> mkhlud...@griddynamics.com> wrote:
>
> > try to search all children remove those who has a value1 by dash, then
> join
> > remaining
> > q={!parent which=contentType:parent}contentType:child -contentType:value1
> > if the space in underneath query causes the problem try to escape it or
> > wrap to v=$subq
> >
> >
> >
> > On Tue, Feb 17, 2015 at 4:13 PM, Sankalp Gupta <
> sankalp.gu...@snapdeal.com
> > >
> > wrote:
> >
> > > Hi
> > >
> > > I need to have a query in which I need to choose only those parent docs
> > > none of whose children's field is having the specified value.
> > > i.e. I need something like this:
> > > http://localhost:8983/solr/core1/select?*q={!parent
> > > which=contentType:parent}childField:NOT value1*
> > >
> > > The problem is* NOT operator is not being supported* in the Block Join
> > > Query Parsers. Could anyone please suggest a way to workaround this
> > > problem?
> > > Have also added the problem on *stackoverflow*:
> > >
> > >
> >
> http://stackoverflow.com/questions/28562355/in-solr-does-block-join-query-parsers-lack-regular-expression-feature
> > >
> > > Regards
> > > Sankalp Gupta
> > >
> >
> >
> >
> > --
> > 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>

Reply via email to