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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:44:15+00:00 2026-06-04T02:44:15+00:00

I am completely lost. I think I am definitely missing something fundamental here. Everybody

  • 0

I am completely lost.
I think I am definitely missing something fundamental here. Everybody has such awesome stuff to say about Solr but I fail to see it.

I indexed a structured pdf document in Solr.
The problem is when I search for a simple string – I get the entire content field as the response!
I don’t know how to change that.
My requirement is that, lets say I search for “metadata”
it should give me

“MetadataDiscussion . . . 4 matches
… make sure that Tika users have a chance to get to all of the metadata created and/or extracted by Tika. == Original Problem == The original inspiration for this page was a Tika …
10.7k – rev: 2 (current)
last modified: 2010-08-02 18:09:45
“

But it gives me the whole document!- the entire string that was indexed.
It seems like Lucene can only tell me in which field it occurred, not where in the field it occurred

Any help will be greatly appreciated!!

  • 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-04T02:44:17+00:00Added an answer on June 4, 2026 at 2:44 am

    Lucene/Solr is primarily a retrieval engine – it retrieves documents that match a query. So this behavior is desirable and expected. Now as for your requirement, you can use the highlighting feature of Solr to give you exactly that. Suppose your document text is stored in a field named text – then you would pass the following parameters to Solr:

    &hl=true&hl.fl=text&hl.snippets=5&hl.fragsize=200
    

    Look through the other parameters to customize it even further.

    Solr is amazing 🙂

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

Sidebar

Related Questions

Probably missing something completely obvious here, but here goes. I'm starting out with Spring
I am completely lost here and I am running out of time. Let me
Not completely a programming question, but its close enough so here goes: In Mac
I am not completely sure about the following table alt text http://files.getdropbox.com/u/175564/algTranslation.png The table
I'm struggling with a deployment issue which leaves me completely lost. It goes like
I am completely lost on this one-- I have a .Rpt file that runs
I'm completely lost as to how or why this error is displaying when I
Hey I am completely lost with this one. Basically the website i'm working on
Completely new to asp.net mvc... completely new to web apps so bear with me...
Completely new to java and I have been playing around with regex in a

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.