Hello everyone, we are using Solr for about 2 years and now we want to extend our queries to improve the relevance. In our case we have parent and child documents and in some cases child documents could help us to improve the way we are sorting the results. The problem is we didn't find at the moment an easy way to boost parent documents based on their child documents and we think we are doing something wrong, as this is a common use case. This could be an example of parent and child document:
- Parent document { "_parent_": true, "_root_": "book/1" "id": "book/1", "docType": "book", "title": "Great expectations" "summary": "... some text ..." } - Child document { "_parent_": false, "_root_": "book/1" "id": "author/1", "docType": "author", "name": "Charles Dickens" "country": "England" "rating": 4.6 } This could be a query: q=great &defType=edismax &qf=title^5 summary &fq=docType:book &fl=*,score Now, how to extend this query if we want to add the rating field from author document to the related book document score? Furthermore, what if we want to boost books written by Australian authors adding two times their rating value? In both cases, how to get only parent documents in the result? Thank you in advance. Ned