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?
I can use fl=fld1,fld2,fld3 tor return specific fields from solr. But sometimes i generate
Share
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..
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.