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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:48:11+00:00 2026-06-11T18:48:11+00:00

I can use fl=fld1,fld2,fld3 tor return specific fields from solr. But sometimes i generate

  • 0

I can use fl=fld1,fld2,fld3 tor return specific fields from solr. But sometimes i generate dynamic field names like “.*_attribute_group1” and want solr to return all group.
Is it posible to extend solr ‘fl’ field with regexp? Where to look in solr codebase?

  • 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-11T18:48:12+00:00Added an answer on June 11, 2026 at 6:48 pm

    Solr doesn’t support wildcard patterns in field names ( "fl" param ). But you could write your own component to process the request & identify the list of fileds present in the index that you want.

    Pesudo Code of extending search component to implement custom fields..

    // PSUEDO CODE
    public class FLPatternCustomComponent extends SearchComponent {
    
        @Override
            //Gauranteed to be called before any other SearchComponent.process
        public void prepare(ResponseBuilder rb) throws IOException {
               SolrParams params = rb.req.getParams();
               //Input fl=field_*
               String[] inputFl = params.getParams(CommonParams.FL);
               Collection<String> existingFl = rb.req.getSearcher().getFieldNames();
               //process & find matching fields{
               SolrQuery newFields = new SolrQuery();
               newFields.set(CommonParams.FL, "field_1,field_2,field_3,field_4");
               AppendedSolrParams appendedParams = new AppendedSolrParams(params, q);
               rb.req.setParams(appendedParams);
    
               super.prepare(rb);
            }
    
        @Override
        public void process(ResponseBuilder rb) throws IOException {
            //Process request
            super.process(rb);
        }       
    }
    

    You could have this a component chained to your existing request handler or create your request handler & perhaps you could also add any additional invariants.

    You may want to consider any additional performance overhead of custom component & its processing. I have created couple of custom components for custom ranking & custom request handlers & use it without much issues.

    You might want to check Solr Plugin Development.

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

Sidebar

Related Questions

I can use this maven plugin maven-jaxb-plugin to generate Java Classes from XSD file.
we can use :git=>'git path'来bundle install gem, but how to use them from a
I can use SELECT * FROM table WHERE id IN (478,278,190,890,123) to return a
I can use .button() to create beautiful submit buttons, but the rest of the
We can use solr range query like: http://localhost:8983/solr/select?q=queryStr&fq=x:[10 TO 100] AND y:[20 TO 300]
I can use Server[request_time] to get current timestamp. But how would I use this
I can use SUM(xpath) to sum all node values, but I also have a
Can wsgi be configured to use a specific python executable? When using the WSGIPythonHome
I can use urllib.request module with Python 3.1. But when I execute the same
I can use @font-face but it does not work in all browsers. Are there

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.