> - Is it the best way to do that ?
> - It's obvious that i need to index the registered users in 
> Solr (because an
> user can search for others), but is it clever to index friend 
> list for each
> user as well ? (if we take a look at the search box on 
> Facebook, or other
> any sexy social network, they propose auto-complete for current user
> friends, so maybe it makes sense...)

This is a common question:

How to merge the resultlist from solr (A) with a resultlist from elsewhere
(B) (offen a RDBMS like in you case).

3 options:

1) do the merge in A:

* fetch the ids from B and do the merge in A (e.g. filterQuery in Solr, be
aware of maxBooleanClauses).

2) do the merge in B:

* fetch the ids from A and do the merge in B (e.g. subselect, has limitation
in big number of Ids too).

3) do the merge in the application (C):

* fetch the ids from A and B and intersect them in C

Depending on the size of the resultsets one of the 3 options is the best ;)


Reply via email to