lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@geschan.de
Subject Re: Searching and scoring with block join
Date Wed, 22 Jan 2014 23:28:52 GMT

Zitat von Mikhail Khludnev <mkhludnev@griddynamics.com>:

> On Wed, Jan 22, 2014 at 10:17 PM, <dev@geschan.de> wrote:
>
>> I know that I can't just make a query like this: {!parent
>> which=is_parent:true}+Term, most likely I'll get this error: child query
>> must only match non-parent docs, but parent docID=XXXX matched
>> childScorer=class org.apache.lucene.search.TermScorer
>>
>
> Hello Gesh,
>
> As it's state there child clause should not match any parent docs, but the
> query +Term matches them because it applies some default field which, I
> believe belongs to parent docs.
>
> That blog has an example of searching across both 'scopes'
> q=+BRAND_s:Nike +_query_:"{!parent which=type_s:parent}+COLOR_s:Red
> +SIZE_s:XL"
> mind exact fields specified for both scopes. In your case you need to
> switch from conjunction '+' to disjunction.
>

Hello Mikhail,

Yes, that's correct.

I also already tried the query you brought as example, but I have  
problems with the scoring.
I'm using edismax as defType, but I'm not quite sure how to use it  
with a {!parent } query.

For example, if I do this query, the score is always 0
{!parent which=is_parent:true}+content_de:Test

The blog says: ToParentBlockJoinQuery supports a few modes of score  
calculations. {!parent} parser has None mode hardcoded.
So, can I change the hardcoded mode somehow? I didn't find any further  
documentation about the parameters of {!parent}.

If I'm doing this request, the score seems only be calculated by the  
results found in "title".
title:Test _query_:"{!parent which=is_parent:true}+content_de:Test"

Sorry if I ask stupid questions but I just have started to work with  
solr and some techniques are not very familiar.

Thanks
-Gesh


Mime
View raw message