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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:04:01+00:00 2026-05-23T18:04:01+00:00

I have been successful in enabling highlighting on Text based field types, but not

  • 0

I have been successful in enabling highlighting on Text based field types, but not for non-text field types…

How does one configure solr to highlight non-text field types? I cannot find a example on the web for non-text fields. Is it even possible?

Specifically I want to highlight the Date value in the document that meets the query.

I am using solrJ to peform the query, could it be the limiting factor?

  • 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-23T18:04:02+00:00Added an answer on May 23, 2026 at 6:04 pm

    Highlighting is not possible on non “text” fields. Look at this:

    /**
       * Returns a collection of the names of all stored fields which can be
       * highlighted the index reader knows about.
       */
      public Collection<String> getStoredHighlightFieldNames() {
        if (storedHighlightFieldNames == null) {
          storedHighlightFieldNames = new LinkedList<String>();
          for (String fieldName : fieldNames) {
            try {
              SchemaField field = schema.getField(fieldName);
    

    Especially here:

              if (field.stored() &&
                      ((field.getType() instanceof org.apache.solr.schema.TextField) ||
                      (field.getType() instanceof org.apache.solr.schema.StrField))) {
    

    until here

                storedHighlightFieldNames.add(fieldName);
              }
            } catch (RuntimeException e) { // getField() throws a SolrException, but it arrives as a RuntimeException
                log.warn("Field \"" + fieldName + "\" found in index, but not defined in schema.");
            }
          }
        }
        return storedHighlightFieldNames;
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to understand what should be the right way in using
I have a working sql query that I have been trying to convert to
Case 1 in question: I have been trying to have a pure 64-bit development
I have a question I really want answered. I have been playing around with
I have created a document template file (.dotx) in Word 2007 and in this
I have searched a long time and cannot find a solution to my problem.
I have a program that i am working on and this is what happen:
I want to upload media and textual files inside the database for my personal
I'm trying to create an always-op-top button/clickable-image which stays on top of all the
I am trying to make a simple script that will remove all unnecessary whitespace

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.