lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Hill <>
Subject Re: Highlighting and Field options
Date Mon, 01 Jun 2009 16:50:13 GMT
Use the fl param to ask for only the fields you need, but also keep hl=true.
Something like this:


Note that &fl=id means the only field returned in the XML will be the id

Highlights are still returned in the "highlight" element, but you won't get
back the unneeded content field.


On Mon, Jun 1, 2009 at 9:41 AM, ashokc <> wrote:

> Hi,
> The 'content' field that I am indexing is usually large (e.g. a pdf doc of
> a
> few Mb in size). I need highlighting to be on. This 'seems' to require that
> I have to set the 'content' field to be STORED. This returns the whole
> content field in the search result XML. for each matching document. The
> highlighted text also is returned in a separate block. But I do NOT need
> the
> entire content field to display the search results. I only use the
> highlighted segments to display a brief description of each hit. The fact
> that SOLR returns entire content field, makes the returned XML
> unnecessarily
> huge, and makes for larger response times. How can I have SOLR return ONLY
> the highlighted text for each hit and NOT the entire 'content' filed?
> Thanks
> - ashok
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message