You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tim Williams <wi...@gmail.com> on 2016/11/03 19:13:50 UTC
child doc filter
I'm using the BlockJoinQuery to query child docs and return the
parent. I'd like to have the equivalent of a filter that applies to
child docs and I don't see a way to do that with the BlockJoin stuffs.
It looks like I could modify it to accept some childFilter param and
add a QueryWrapperFilter right after the child query is created[1] but
before I did that, I wanted to see if there's a built-in way to
achieve the same behavior?
Thanks,
--tim
[1] - https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/search/join/BlockJoinParentQParser.java#L69
Re: child doc filter
Posted by Mikhail Khludnev <mk...@apache.org>.
Hello Tim,
I think
http://blog-archive.griddynamics.com/2013/12/grandchildren-and-siblings-with-block.html
provides a few relevant examples. To summarize, it's wort to use nested
query syntax {!parent... v=$foo} to nest a complex child clause. If you
need to exploit filter cache, use filter(foo:bar) syntax.
Regards
On Thu, Nov 3, 2016 at 10:13 PM, Tim Williams <wi...@gmail.com> wrote:
> I'm using the BlockJoinQuery to query child docs and return the
> parent. I'd like to have the equivalent of a filter that applies to
> child docs and I don't see a way to do that with the BlockJoin stuffs.
> It looks like I could modify it to accept some childFilter param and
> add a QueryWrapperFilter right after the child query is created[1] but
> before I did that, I wanted to see if there's a built-in way to
> achieve the same behavior?
>
> Thanks,
> --tim
>
> [1] - https://github.com/apache/lucene-solr/blob/master/solr/
> core/src/java/org/apache/solr/search/join/BlockJoinParentQParser.java#L69
>
--
Sincerely yours
Mikhail Khludnev