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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:15:38+00:00 2026-05-31T08:15:38+00:00

I am using solrj for a distributed search. Based on certain user preferences, I

  • 0

I am using solrj for a distributed search. Based on certain user preferences, I will have to search through a particular set of indexes. Is there any way through which I can programatically(duh!) specify the datadir for that particular search query?

I did snoop through the documentation, but couldn’t find anyway other than having the datasets in different cores, is there a better way?

Edit 1 : All the set of indexes have the same schema format.

  • 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-05-31T08:15:40+00:00Added an answer on May 31, 2026 at 8:15 am

    You can change the dataDir almost dynamically using the CREATE CoreAdmin action, and specifying a dataDir parameter.

    Creates a new core based on preexisting
    instanceDir/solrconfig.xml/schema.xml, and registers it. If
    persistence is enabled (persist=true), the configuration for this new
    core will be saved in ‘solr.xml’. If a core with the same name exists,
    while the “new” created core is initalizing, the “old” one will
    continue to accept requests. Once it has finished, all new request
    will go to the “new” core, and the “old” core will be unloaded.

    Anyway you’ll need to load a new core, it isn’t possible changing the data directory without doing it.

    You can use solrj to invoke CoreAdmin action using the CoreAdminRequest and CoreAdminResponse classes.

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

Sidebar

Related Questions

Can I perform a distributed search using solrj? If so how? (note : not
I have been using solr search and now I am adding pagination via the
I have been using SolrJ, the Java client for Apache Solr server, at my
I am using SOLR 1.3.0 for performing a distributed search over already existing lucene
I am using solr to search through indices written through lucene's index writer. My
I am using SOLR 3.5.0..!! I have made two Indexes : Cars and Vendors
How can I search something using Solr? I have setup the Solr server in
I want to using solr for search on articles I have 3 table: Group
I am having difficulties performing a search using Solr on certain fields. I am
I'm using solrj to index data, I have created some new field in schema.xml,

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.