2

I am investigating using SOLR 4.0 with joins, and while reading their examples, I want to know if it's possible to combine joins and ordering by.

For instance, suppose there are 2 separate document types: products docs + manufacturer docs. Each product has an id "manu_id_s", which is essentially a "foreign key" that joins a product to manufacturer.

If I wanted to find all products matching ipod (sorted by score) and filter that by the set of products produced by "Belkin" or "Apple", my query would look like:

http://localhost:8983/solr/select?q=ipod&fl=*,score&sort=score+desc&fq={!join+from=id+to=manu_id_s}compName_s:%28Belkin%20Apple%29

What if I wanted to return all products matching iPod, BUT instead of sorting it by score I want to sort it by some field INSIDE the manufacturer doc like manufactured date.

Is this possible? How would such a query look like, roughly?

4

0 回答 0