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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:22:42+00:00 2026-06-13T16:22:42+00:00

If i have 2 records into my SOLR indexing with same email address and

  • 0

If i have 2 records into my SOLR indexing with same email address and my keyword search is getting both of them in the result set, how can i display one of them. For example;

Record 1:

<doc>
     <id>123</id>
     <name>Adil Malik</name>
     <email>abc@hotmail.com</email>
     <jobtitile>Software Engineer</jobtitle>
</doc>

Record 2:

<doc>
     <id>456</id>
     <name>Adil Malik</name>
     <email>abc@hotmail.com</email>
     <jobtitile>Database Developer</jobtitle>
</doc>

If we search with “abc@hotmail.com”, it will return both records but i want to display any one of them. How can i query in the SOLR search to display only one record if we have 2 with same email address?

NOTE: i want to keep both records into my SOLR indexing.


In reply to @Layke

enter image description here

  • 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-13T16:22:44+00:00Added an answer on June 13, 2026 at 4:22 pm

    You should do some reading on FieldCollapsing and also on Deduplication (Deduplication prevents documents from entering the index at all, which isn’t what you want, but I’ll keep it here to help other readers where this might be suitable. ).

    To use the FieldCollapsing, you would use your query and have group: true , group.field : email

    However, looking at the document examples you provided, I would probably say that you have designed your schema wrong, and what you actually want to do it use Multi Values fields.

    Read this question here it might explain/advise how you should have used MVF instead.

    What is the use of "multiValued" field type in Solr?

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

Sidebar

Related Questions

I have 120k db records to commit into a Solr index. My question is:
I have a problem for querying records into mysql explanation below The user could
I have a PHP function which inserts multiple records into MySQL: function commit_purchase($asset_type_ID, $org_ID,
I have records in table1, if the records exist, it must copy into table2.
I have a database for which I need to aggregate records into another smaller
I have a large .txt file of records that I need to convert into
we have a .NET 3.5 WinForms app that uses Linq2Sql to insert records into
I have extracted records from a database and stored them on an HTML page
I have a Mule 3.3.0 flow which splits a file into records. I need
I have a multithreaded process which inserts several records into a single table. The

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.