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 "Edwards, Joshua" <Jo...@capitalone.com> on 2014/10/09 20:50:23 UTC

Facets for Child Documents?

Is it possible to use a facet to filter parent documents based on a child field?  For example, if I have Authors as my main record, and Books as the child record, would it be possible to have a facet that filtered Authors by Book publication date (with publication date existing on the Book document, but not directly on the Author document)?

Thanks,
Josh Edwards
________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed.  If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: Facets for Child Documents?

Posted by Oleg Savrasov <os...@griddynamics.com>.
Hi Joshua,

The functionality you are asking about is requested by
https://issues.apache.org/jira/browse/SOLR-5743.
I've prepared a patch with initial implementation and going to speak about
it on Lucene/Solr Revolution 2014 Conference, held in Washington, DC on
November 11-14, http://lucenerevolution.org/.
Please see 'Faceting with Lucene BlockJoinQuery'  talk announcement in
Internals Sessions.
You are very welcome to join the conference and participate in discussion.
Your vote for https://issues.apache.org/jira/browse/SOLR-5743 would also be
match appreciated.

Thank you,
=====
Dr Oleg Savrasov,
Community Coordinator,
Grid Dynamics Search team

2014-10-10 20:32 GMT+04:00 atawfik <co...@gmail.com>:

> Yes. One way is using a join query to link authors to books. The query will
> look like this:
>
> q={!join to=author_id_fk to=author_id} publication_date:[...]
>
>
> The other way is using grouping. Here, you first retrieved books based
> their
> publication then group them on their authors.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Facets-for-Child-Documents-tp4163592p4163751.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Facets for Child Documents?

Posted by atawfik <co...@gmail.com>.
Yes. One way is using a join query to link authors to books. The query will
look like this:

q={!join to=author_id_fk to=author_id} publication_date:[...]


The other way is using grouping. Here, you first retrieved books based their
publication then group them on their authors.



--
View this message in context: http://lucene.472066.n3.nabble.com/Facets-for-Child-Documents-tp4163592p4163751.html
Sent from the Solr - User mailing list archive at Nabble.com.