Reputation: 4077
I am new to Solr and I have got stuck while doing a join between various documents (which came in the solr package). The following url :-
http://localhost:8983/solr/collection1/select?q={!join+from=id+to=manu_id_s+cache=false}id:*
is generating a different response as compared to the following url :-
http://localhost:8983/solr/collection1/select?fq={!join+from=id+to=manu_id_s+cache=false}id:*
I looked up the documentation of join on the wiki. But, they are using join with the main query only. Can you please let me know if it is possible to do a join with a filter query or if there is some other parameter which I need to give so that the join with a filter query can work ?
Upvotes: 3
Views: 1593
Reputation: 3643
In general, if only a filter query (fq
) is specified, no results will be returned. (More precisely, if no q
parameter is specified, it defaults to the "match no documents" query.)
Setting the q
parameter to [* TO *]
matches all values in the default field (and it seems that now *
will do the same thing), so you should get the same set of results returned, but not necessarily in the same order, if you modify your second query to be:
http://localhost:8983/solr/collection1/select?fq={!join+from=id+to=manu_id_s+cache=false}id:*&q=[*+TO+*]
fq
does not affect the score of the candidates, but affects the subset of candidates which q
and the various boost queries score.
Upvotes: 3