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 8540339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:34:30+00:00 2026-06-11T11:34:30+00:00

My Solr Index has two types of Users( Type-A and Type-B ), which can

  • 0

My Solr Index has two types of Users( Type-A and Type-B ), which can be identified with a field called as ‘type’.
But there is possibility for an user to have entries under both Types(A and B).

For example,

Jacob is a user who comes under both Types(A and B). So, he will have two documents in our Index like:  
//document-1  
name:...  
type:A  
age:...  
//end of document-1


//document-2  
name:...  
Type:B  
age:...  
//end of document-2

My objective is,

  • When a user is searched and he is only of Type-A, he should be in the
    result.

  • When a user is searched and he is only of Type-B, he should be in the
    result.

  • When a user(like Jacob) is searched and he is of both Type A and B,
    only document of Type-A should be in the result.

How could we achieve this through queries?
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-11T11:34:31+00:00Added an answer on June 11, 2026 at 11:34 am

    I assume you have some field that can identify uniquely a user? like name or iduser? if so just group by that fields using grouping. If you set group.main=true then the result will look no different than if you were not using grouping

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Solr index with a year field, I can query all results
My database has three columns, which I configured lucene to index. However, I can
Consider a Solr index with the following fields: <fields> <field name=id type=uuid indexed=true stored=true
I have product index at solr, product has category field and I need to
I need to run a JOIN query on a solr index. I've got two
I have within my SOLR index song objects which belong to a higher level
I'm using Apache Solr and querying an index with a schema that has a
Here's my search query: name_text_partial_all:hello world The field has these words in the index
is there anyway to perform OCR while uploading a document? can we index the
I'm getting unexpected results in Solr and hoping someone can help. My schema.xml has

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.