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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:52:44+00:00 2026-06-10T13:52:44+00:00

I have a single core solr instance running. I want to store two different

  • 0

I have a single core solr instance running. I want to store two different types of docs.

  1. Basic profile for a user(s). (fields: uid : “1” , docType=”profile”..)
  2. The cars each user owns. (fields uid:”1″, docType=”cars”…)

1 will have single doc per user. 2 will have multiple docs(each separate car) for each user.

I dont want multivalues field for cars due to some design reason. I need multiple docs for 1 car per user.

If i declare uid as unique field in schema then my car doc added later will overwrite my profile doc for that user, or even other car docs from the same user added previously bcoz the uid is same. How can I achieve what I am trying to(i.e. 1 profile doc per user and multiple car docs per user)

I have just started working on solr so this cud be very basic so please pardon me for that.

Thnx for your time.

  • 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-10T13:52:45+00:00Added an answer on June 10, 2026 at 1:52 pm

    You can solve this by adding the Universal Unique Identifier to the schema.xml.

    In the schema.xml file add the following fieldType.

    <fieldType name="uuid" class="solr.UUIDField" indexed="true" />
    

    Then add new field with this type.

    <field name="id" type="uuid" indexed="true" stored="true" default="NEW" />
    

    Finally, define your uniqueId key with this field.

    <uniqueKey>id</uniqueKey>
    

    For more information check UniqueKey page in Solr wiki.

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

Sidebar

Related Questions

I'd like to have a single instance of Solr , protected by some sort
I have a multicore implementation of solr. I want to configure DIH / core.
I have a single-threaded application that uses 3 SQLite databases in 3 different files
I have a single big text file in which I want to process each
Let's say I have a 4-core CPU, and I want to run some process
We have several core's setup in SOLR and would like to search across these
i have a single filed which i need to clone with a clone button
I have A single page that has the following structure <form runat=server><placeholder></placeholder></form> I have
i have a single video (duration: 3 seconds) and i need to create 2
I have a single-view application that takes in a username and a password and

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.