Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9259147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:35:06+00:00 2026-06-18T12:35:06+00:00

I am newbie to solr. So please bear with me. Use cases User can

  • 0

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
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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:35:08+00:00Added an answer on June 18, 2026 at 12:35 pm

    You should have a string field for share_level, with possible value of private, 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:

    +name:$search +(share_level:public (+share_level:friends +friends_ids:$uid))
    
    $search = picnic
    $uid = 3 (jack)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a newbie in Solr and maven and i want to make a
Newbie (perhaps stupid) question: How can I use the value of alt in the
Solr newbie here. I have created a Solr index and write a whole bunch
newbie question, please forgive... I'm developing a Wpf UserControl that will eventually be bound
Newbie here, so bear with me... Would it be possible to find patterns of
Newbie here :-) Can anyone help me with a suggestion for the best time
Newbie here. I'm using codeigniter and mysql How can I dynamically (number of names
Newbie technical difficulty here. Hope I can explain this clearly. in My DB, I
Newbie to StackOverflow as a poster, so please let me know if I violate
I am newbie in solr, i have a table like this id infield body

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.