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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:16:09+00:00 2026-06-12T15:16:09+00:00

My understanding is that indexing a PDF, Word, Excel, etc. document through Solr will

  • 0

My understanding is that indexing a PDF, Word, Excel, etc. document through Solr will allow searching but not highlighting. I have this code to perform the indexing:

        String urlString = "http://localhost:8983/solr"; 
        SolrServer solr = new HttpSolrServer(urlString);
        ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract");

        for (MultipartFile file : files) {
            if (file.getOriginalFilename().equals("")) {
                continue;
            }
            File destFile = new File(destPath, file.getOriginalFilename());
            file.transferTo(destFile);
            up.addFile(destFile);

            up.setParam("literal.id", destFile.getAbsolutePath());
            up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);

            try {
                solr.request(up);

            } catch (SolrServerException sse) {
                sse.printStackTrace();
            }

        }

    }
    } catch (IOException ioe) {
      ioe.printStackTrace();   
    }

I have read that in order to enable highlighting I will need to “store/parse the content?” How can this be done? Thanks for your help.

  • 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-12T15:16:10+00:00Added an answer on June 12, 2026 at 3:16 pm

    You will need to modify the Schema file for your Solr instance and set stored="true"for the content field. I am assuming that you are using the default field settings for the ExtractingRequestHandler want to return highlight results against that field.

    Please reference the Field Options By Use Case for a matrix and notes on what field options must be enabled for Highlighting and other features to work correctly.

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

Sidebar

Related Questions

It is my understanding that one can handle events through Swing by adding a
It was my understanding that when you destroy a parent document in Mongo that
It is my understanding that System.Core.dll and System.Xml.Linq.dll are supported (or will be) in
It is my understanding that it is not possible to have an optional parameter
It's my understanding that the constructor for a controller is not called during each
I'm of the understanding that an unhandled exception in any appdomain will bring down
It is my understanding that a display:block will automatically start in a new line.
It is my understanding that expression templates will break on ranged based for in
It's my understanding that the Java compiler produces byte code, not object code. First
I have the understanding that using /../ in a file location in bash will

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.