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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:26:07+00:00 2026-06-01T00:26:07+00:00

I’m posting documents to the SOLR server, roughly 5000 documents at a time per

  • 0

I’m posting documents to the SOLR server, roughly 5000 documents at a time per commit. At the end of the multiple commits, I look at the SOLR admin panel, instead of their being 280,000 documents, the SOLR admin panel reports only having 5000 documents.

It looks like every time I call a commit the documents are getting overwritten. However the indexes are growing in size.

Here is the API that I’m referring to:
http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/SolrServer.html#add%28java.util.Collection%29

Here is the code:

    private final SolrServer server; 
    this.server = new CommonsHttpSolrServer(getPropertyManager().getSolrMasterUrl());
    final Collection<UpdateResponse> responses = new ArrayList<UpdateResponse>(4);
    responses.add( server.add(solrDocuments) );
    responses.add( server.optimize() );
    responses.add( server.commit() );

I see the indexes in SOLR increase in KB every time there is a commit of another 5000 documents, the indexes grow. However, the SOLR admin panel reports only having 5,000 documents, so it does not make any sense.

numDocs: 5164

maxDoc: 5164

version: 1332445599423

segmentCount: 1

current: true

hasDeletions: false

directory: org.apache.lucene.store.SimpleFSDirectory:org.apache.lucene.store.SimpleFSDirectory@ Z:\jboss-soa-p-5\jboss-as\server\experimental\solr\data\index lockFactory=org.apache.lucene.store.NativeFSLockFactory@8d921a

lastModified: 2012-03-23T13:38:53.539Z

  • 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-01T00:26:08+00:00Added an answer on June 1, 2026 at 12:26 am

    Check to ensure that the 5000 documents you are sending each time are unique. If you are sending the same set of documents each time, Solr is smart enough to just replace the old documents with the new ones (if the other fields are different), otherwise it will just ignore the request to add the document because it already has matching copy.

    This is being done based on the <uniqueKey> setting in your schema.xml file. So, if your documents have an id field that is specified as the uniqueKey and you number them 1 – 5000 and you keep sending the same set of documents into Solr, it will just keep ignoring the requests to add the sets.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a reasonable size flat file database of text documents mostly saved in
I am trying to loop through a bunch of documents I have to put
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text

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.