lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emir Arnautović <emir.arnauto...@sematext.com>
Subject Re: How to restrict the fields solr returns?
Date Tue, 19 Dec 2017 13:32:56 GMT
In addition to that, you can use invariants to disallow overriding it.

Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 19 Dec 2017, at 14:23, Diego Ceccarelli <diego.ceccarelli@gmail.com> wrote:
> 
> 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
View raw message