lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sokolov <msoko...@gmail.com>
Subject Re: Index-time join ToParentBlockJoinQuery query produces incorrect result
Date Wed, 03 Jul 2019 19:33:57 GMT
Well for one thing, you might have other documents in the index that
are neither parents nor children (in this particular relation). Also,
consider a nested hierarchy - how can we automatically figure out
which "generation" or "level" of parent to select?

On Wed, Jul 3, 2019 at 2:50 PM ANDREI SOLODIN <asolodin@comcast.net> wrote:
>
> After looking through the unit tests, I got it working. The problem was that I thought
the parent filter in the ToParentBlockJoinQuery can be used to select a subset of parents.
It appears that the parent filter must select ALL parents, not a subset. This is not explained
in the javadoc. If you want to select a subset of parents (independently of the child query),
ToParentBlockJoinQuery can not be used on its own, but rather as a clause in another query.
>
> It would be a nice enhancement to just automatically select all parents, I mean, it is
already required to be the last document in the block, why do we need to provide a query for
them?
>
> > On July 3, 2019 at 10:52 AM ANDREI SOLODIN <asolodin@comcast.net> wrote:
> >
> >
> >     Thanks Mikhail.
> >
> >
> >     I read through the javadoc and thought I was satisfying all the preconditions.
Obviously not :-) Is it this part that am I getting wrong: "At search time you provide a Filter
identifying the parents, however this Filter must provide an BitSet https://lucene.apache.org/core/8_1_1/core/org/apache/lucene/util/BitSet.html?is-external=true
per sub-reader."? If so, given the data above how do I properly create a parent query?
> >
> >
> >         > > On July 3, 2019 at 10:30 AM Mikhail Khludnev < mkhl@apache.org
mailto:mkhl@apache.org > wrote:
> > >
> > >
> > >         On Wed, Jul 3, 2019 at 6:11 PM ANDREI SOLODIN < asolodin@comcast.net
mailto:asolodin@comcast.net > wrote:
> > >
> > >         >
> > >
> > >             > > > This returns "id00003", which is unexpected.
> > > >
> > > >         > >
> > >             > > > Please check ToPBJQ javadoc. It's absolutely expected.
> > > >
> > > >         > >         --
> > >         Sincerely yours
> > >         Mikhail Khludnev
> > >
> > >     >
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message