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 Chris Hostetter <ho...@fucit.org> on 2011/09/01 20:52:53 UTC

Re: Solr Join with multiple query parameters

: http://localhost:8983/solr/core0/select?q={!join%20from=matchset_id_ss%20to=id}*:*&fq=status_s:completed
: 
: I get filtered results of documents that are completed. The issue I am now
: trying to face is how do I filter the initial search of documents based on
: multiple conditions and then get a list of documents through the join. Here is
	...
: Is there a way that I can apply multiple filters first, then complete the
: join? And if that is possible, can I then add more filters after the join?

I'm not certian, but i believe what you need to do is formulate your 
filters as part of the main sub query for the join (currently "*:*).
You can make it a little cleaner by using LocalParam variable refs, but 
unfortunately LocalParams doesn't really have any syntax for refering to 
multivalued params, and i don't think there's any way to do filter 
queries. 

So i think you would have to do soemthing like...

	q={!join from=matchset_id_ss to=id v=$qq}
	qq=+status_i:1 +team_id_i:1223

...and make the join query into your "filter" constraint on the join docs

It would be nice if we had a more genearl way to support something like...

	param={!foo fq=filterA fq=filterB}main query

...where the query produced was automaticly constrained by filterA and 
filterB (as if in a BooleanQuery) but those filter queries were cached 
independently -- but i'm not sure off the top of my head how to implement 
something like that.

-Hoss