Thanks Hoss!

But unfortunately, the dismax parameters (like qf) are not passed over to
the fromIndex. In fact, even if using var dereferencing makes Dismax to be
selected as the "fromQueryParser", the query that is passed to the
JoinQuery object contains nothing to indicate that it should use dismax.
The following code is from the method createParser in
JoinQParserPlugin.java:

// With var dereferencing, this makes the fromQueryParser  to be dismax
QParser fromQueryParser = subQuery(v, "lucene");

// But after the call to getQuery, there is no indication that dismax
should be used
Query fromQuery = fromQueryParser.getQuery();
JoinQuery jq = new JoinQuery(fromField, toField, fromIndex, fromQuery);

So I guess that as it is right now, dismax can't really be used with joins.

On Fri, Dec 9, 2011 at 3:20 PM, Chris Hostetter <hossman_luc...@fucit.org>wrote:

>
> : Is there a specific reason  why it is hard-coded to use the "lucene"
> : QParser? I was looking at JoinQParserPlugin.java and here it is in
> : createParser:
> :
> : QParser fromQueryParser = subQuery(v, "lucene");
> :
> : I could pass another param named "fromQueryParser" and use it instead of
> : "lucene". But again, is there a reason why I should not do that?
>
> It's definitley a bug, but we don't need a new local param: that hardcoded
> "lucene" should just be replaced with null, so that the "defType"
> local param will be checked (just like it can in the BoostQParser)...
>
>   qf=text name
>   q={!join from=manu_id_s to=id defType=dismax}ipod
>
> Note: even with that hardcoded "lucene" bug, you can still override the
> default by using var dereferencing to point at another param with it's own
> localparams specying the type...
>
>   qf=text name
>   q={!join from=manu_id_s to=id v=$qq}
>   qq={!dismax}ipod
>
> -Hoss
>



-- 
Pascal Dimassimo
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/

Reply via email to