If you need to return only a subset of the fields for each request you can
set them as default in the solrconfig.xml.

On Dec 19, 2017 13:45, "Solrmails" <solrma...@protonmail.com> wrote:

> I found a solution: I created a custom Search Handler and overridden
> 'handleRequestBody'. Then I modify the "getParams" collection within
> 'handleRequestBody' to enforce the fl param.
>
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
>
> > -------- Original Message --------
> > Subject: Re: How to restrict the fields solr returns?
> > Local Time: 19 December 2017 1:02 PM
> > UTC Time: 19 December 2017 12:02
> > From: rl...@leirtech.com
> > To: solr-user@lucene.apache.org
> >
> > The fl parameter is used for this.
> >
> > On December 19, 2017 3:22:59 AM EST, Solrmails solrma...@protonmail.com
> wrote:
> >
> >> Hey
> >> I'm using a custom "QParserPlugin" to restrict which documents are
> >> returned to the user.
> >> Now I'd like to restrict also the fields that are returned with a
> >> document. I couldn't find a good entry point to do such a restriction.
> >> Maybe I could missuse a "QueryResponseWriter" plugin but that sounds
> >> like a bad idea.
> >> Any other ideas?
> >>
> >> --
> >> Sorry for being brief. Alternate email is rickleir at yahoo dot com

Reply via email to