I am newbie to solr. So please bear with me.
Use cases
- User can share his photos to friends or publicly or make it private.
- User can search for people or photos(he should view only public photos, shared with him).
I have denormalized my relational data to solr schema. I have merged the user object & photo object into solr schema
So,
- If user jack (user 3) is searching for “picnic” He shouldn’t see the photo_1 but see photo_2.
- If user venu is searching for “picnic” He should see the photo_1 and photo_2.
How can I force solr to look into friends_ids, share_level field? can I do with facet.field? Is dynamic fields work for this case? I have read some tutorials but I am not getting clear picture.
Hope you guys shed some light on this. So that I can take forward. I hope this should be possible.
Thanks in advance!
You should have a string field for
share_level, with possible value ofprivate, public, friends.You should also have a multiValued field for
friends_ids,and it should store each user id instead of the current CSV format
NOTE: you should revised this column type, NEVER use CSV in mysql, use a proper entity relationship
So, once you have the field ready, and complete the reindex,
to search for photo will be just: