lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Solrmails <solrma...@protonmail.com>
Subject Re: How to restrict the fields solr returns?
Date Tue, 19 Dec 2017 15:41:21 GMT
Thank you for your answer. I'd like to restrict the returned fields dynamicaly based on a permission
system. I think modifieng the "getParams" collection to add fl within the 'handleRequestBody'(CustomSearchHandler)
should do the work?

Sent with [ProtonMail](https://protonmail.com) Secure Email.

> -------- Original Message --------
> Subject: Re: How to restrict the fields solr returns?
> Local Time: 19 December 2017 2:23 PM
> UTC Time: 19 December 2017 13:23
> From: diego.ceccarelli@gmail.com
> To: solr-user@lucene.apache.org, Solrmails <solrmails@protonmail.com>
>
> 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" solrmails@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: rleir@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 solrmails@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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message