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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:35:13+00:00 2026-06-10T20:35:13+00:00

I’m trying to set things up (in my local environment) so I can store

  • 0

I’m trying to set things up (in my local environment) so I can store PDFs in Solr, but I cannot get it to work. Right now I’m working with the files in the example folder Solr provides.

I did not modify the solrconfig.xml in solr-3.6.0/example/conf because it seems to already be configured as described in Extracting Request Handler. That is, it already contains this:

<lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
<lib dir="../../contrib/extraction/lib" regex=".*\.jar" />

And this:

<requestHandler name="/update/extract" 
              startup="lazy"
              class="solr.extraction.ExtractingRequestHandler" >
<lst name="defaults">
  <str name="fmap.content">text</str>
  <str name="lowernames">true</str>
  <str name="uprefix">ignored_</str>
  <str name="captureAttr">true</str>
  <str name="fmap.a">links</str>
  <str name="fmap.div">ignored_</str>
</lst>

I’m running Solr from the example directory with this command:

java -jar start.jar 

And I’m trying to send the pdf to Solr with this command:

java -Durl=http://localhost:8983/solr/update/extract -Dauto -jar /Applications/Solr-3.6.0/example/exampledocs/post.jar /path/to/pdf/mypdf.pdf

If I don’t make any changes to /Solr-3.6.0/example/solr/conf/schema.xml I get the message:

FATAL: Solr returned an error #400 [doc=null] missing required field: id

If I change the value of the property “required” in the id element in schema.xml to false I get:

FATAL: Solr returned an error #400 Document is missing mandatory uniqueKey field: id

I would think that if the required property of an element is false in the schema then I could just send files that do not contain that field but apparently that is not the case.

I have also tried adding the parameter -Dparams=literal.id=mypdf1 in the command that send that pdf but that doesn’t help either. Any thoughts?

  • 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-10T20:35:14+00:00Added an answer on June 10, 2026 at 8:35 pm

    I believe my confusion was due to the fact that you need to have an id for the document you are sending to Solr, and at the same time there is an id element in Solr-3.6.0/example/solr/conf/schema.xml.

    I believe the first error I was getting was referring to the id element in the schema. The second error was referring to the document id.

    With the help of ZeroPage I was able to overcome the second error as well, by adding the document id to the url instead of passing it as a separate parameter. This query now works for me:

    java -Durl=http://localhost:8983/solr/update/extract?literal.id=form1 -jar /Applications/Solr-3.6.0/example/exampledocs/post.jar /path/to/pdf/form1.pdf 
    

    If we want Solr to index the full content of the PDF we need to add the uprefix and fmap.content atrributes:

    java -Durl="http://localhost:8983/solr/update/extract?literal.id=form1&uprefix=attr_&fmap.content=attr_content&commit=true" -jar /Applications/Solr-3.6.0/example/exampledocs/post.jar /path/to/pdf/form1.pdf
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Seemingly simple, but I cannot find anything relevant on the web. What is the
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

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.