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

  • Home
  • SEARCH
  • 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 8661437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:29:52+00:00 2026-06-12T16:29:52+00:00

In my Solr schema, I want to create a multiValued field and set multiple

  • 0

In my Solr schema, I want to create a multiValued field and set multiple values per default. Possible values are e.g. A, B and C. Can I just set some of them as a comma-separated list?

What I’d like to do is:

<field ...
       multiValued="true" 
       default="A,B"/>

Is this the right way? Unfortunately I couldn’t find any hints in the official documentation.

  • 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-12T16:29:53+00:00Added an answer on June 12, 2026 at 4:29 pm

    I have tried many different ways by playing with schema but it seems like you cant put multiple default values by using schema only. The syntax that you wrote makes your multivalued field have a single entry like

    <str>A,B</str>
    

    which is not useful..

    As there is no documentation about it i would recommend you to check here – which you have probably checked before

    You can try to hack solr source code to handle multiple default values on schema.. it could be also painful too, as the documentation is not that well even for the code itself, but i think it is possible to do..

    p.s because i cant comment under your question i had to write this as answer

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

Sidebar

Related Questions

There is a parameter in the Solr schema to set a default search field
In solr schema.xml I have a field <field name=name type=string indexed=true stored=true multiValued=false />
I want to use solr to create an autosuggestion dropdown for a search field
So I am attempting to have a custom field in my Solr schema that
So I have set up Solr with multiple cores using the MultiCore feature which
I was wondering if it's possible to get the full schema or just the
I'm have a solr schema with dynamic field of different types in. Eg in
I have a Solr schema that has a url field: <fieldType name=url class=solr.TextField positionIncrementGap=100>
I want to apply case-insensitive search for field myfield in solr. I googled a
I have one field that is indexed as string in Solr's schema.xml, which is

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.