lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Solr Join with multiple query parameters
Date Thu, 01 Sep 2011 18:52:53 GMT

: 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

Mime
View raw message