lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <mkhlud...@griddynamics.com>
Subject Re: ToParentBlockJoinQuery vs filtered search
Date Mon, 06 Feb 2012 04:43:51 GMT
On Mon, Feb 6, 2012 at 2:25 AM, Michael McCandless
<lucene@mikemccandless.com> wrote:
>
> Hi Mikhail,
>
> BlockJoinQParserPlugin sounds cool!
>
> I think you're right: the incoming filter will apply to the "to"
> document space.  So, for ToParentBJQ it's parent docs, and ToChildBJQ
> it's child docs.  The filter only needs to define the bits for docs in
> that "to" space... the other bits will not be used.


Thanks for resolving my hesitations. It allows me move forward.

>
>
> It looks like that's what your test case is testing for...?  Does it pass?

Of course it doesn't.
the first reason is that BlockJoinWeight.scorer()
http://svn.apache.org/viewvc/lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java?view=markup
has the opposite intention (btw, are you %100 sure?):
 * Children query is filtered by the given filter
childWeight.scorer(readerContext, true, false, *acceptDocs*);
 * Parent filter  is not constrained
parentsFilter.getDocIdSet(readerContext,
*readerContext.reader().getLiveDocs()*);
That's why I asked for the rationale of filtered BJQ search.

The also complication which I met is that
AssertingIndexSearcher.wrapFilter() randomly switches from filtered
search to FilteredQuery.
http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test-framework/java/org/apache/lucene/search/AssertingIndexSearcher.java
it leads to IllegalStateException"parentFilter must return
FixedBitSet; got "BitsFilteredDocIdSet. I suppose I can deal with it.

>
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Sun, Feb 5, 2012 at 3:25 PM, Mikhail Khludnev
> <mkhludnev@griddynamics.com> wrote:
> > Hello,
> >
> > I'd like to contribute BlockJoinQParserPlugin for Solr. It's not a very big
> > deal, but I'm stuck during writing filtered search test cases. At the first
> > glance it looks like deja vu for another
> > "join" https://issues.apache.org/jira/browse/SOLR-3062 http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java?r1=1238085&r2=1239355.
> > But then I realized that it's a question about requirements:
> >
> >  What is the expected functionality for ToParentBlockJoinQuery for filtered
> > search IndexSearcher.search(Query, *Filter*, Collector)? whether the given
> > filter is applied to children documents or to the parent documents?
> >
> > Considering Solr's fq= I suppose that there is more sense to apply that
> > filter to parent documents. WDYT?
> >
> > I'm attaching the small amendments to TestBlockJoin to get you my
> > understanding.
> >
> > Thanks in advance.
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> > Lucid Certified
> > Apache Lucene/Solr Developer
> > Grid Dynamics
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: dev-help@lucene.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>



--
Sincerely yours
Mikhail Khludnev
Lucid Certified
Apache Lucene/Solr Developer
Grid Dynamics

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


Mime
View raw message