: I've been reading the information on the new join feature and am not quite
: sure how I would use it given my schema structure. I have "User" docs and
: "BlogPost" docs and I want to return all BlogPosts that match the fulltext
: title "cool" that belong to Users that match the description "solr".

The key thing to understand about the "join" functionality is that it is a 
query parser -- you specify a query against some docs, and whatever docs 
match, the "from" and "to" fields are used to join the matching 
set against the rest of the documents in the index to find the final 
matching set.

If you use the join parser it in the "q" param, you can then subsequently 
filter that set using "fq" params, but if you want to filter the "pre-join 
doc set" that needs to be part of the query string passed o the join 
parser.

I just added some more examples to the wiki page...

https://wiki.apache.org/solr/Join


In your case, i think what you want would be something like...

        q=title_text:cool
        fq={!join from=user_id_i to=user_id_i}description_text:solr

...so your scores would come from the word "cool", but the set would be 
constrained by BlogPosts that join to User docs matching "solr"



-Hoss

Reply via email to