You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by PeterKerk <ve...@hotmail.com> on 2013/11/06 16:58:55 UTC

Limit single field length in solr response via the request url

I'm requesting fields like so:

http://localhost:8983/solr/test/select/?indent=on&facet=true&wt=json&start=0&rows=20&fl=
id,title,description,pricerange

However, the field description might be more than 4000 characters long, so I
want to limit it to a maximum of 100 characters and then cut it off.
I don't want this all the time but it has to be configurable via the URL.

Is this possible?



--
View this message in context: http://lucene.472066.n3.nabble.com/Limit-single-field-length-in-solr-response-via-the-request-url-tp4099597.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Limit single field length in solr response via the request url

Posted by Erick Erickson <er...@gmail.com>.
Here are some options:

http://grokbase.com/t/lucene/solr-user/10c3t860zn/limit-number-of-characters-returned

Best,
Erick


On Wed, Nov 6, 2013 at 10:58 AM, PeterKerk <ve...@hotmail.com> wrote:

> I'm requesting fields like so:
>
>
> http://localhost:8983/solr/test/select/?indent=on&facet=true&wt=json&start=0&rows=20&fl=
> id,title,description,pricerange
>
> However, the field description might be more than 4000 characters long, so
> I
> want to limit it to a maximum of 100 characters and then cut it off.
> I don't want this all the time but it has to be configurable via the URL.
>
> Is this possible?
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Limit-single-field-length-in-solr-response-via-the-request-url-tp4099597.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>