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 Eric Lease Morgan <er...@infomotions.com> on 2009/09/23 02:41:42 UTC

returning stored fields

Is there any way to configure in solrconf.xml (or anywhere else) what  
fields to return by default?

I am indexing sets of full text books. My fields include metadata  
(author, title, publisher, etc.) as well as the full text of the book.  
Since I want to enable highlighting against the full text I need to  
store the full text field, but I don't want to return it in queries.

Is it all or nothing? Is the only way to specify what fields get  
returned by default through the fl parameter?

-- 
Eric Lease Morgan


Re: returning stored fields [resolved]

Posted by Eric Lease Morgan <er...@infomotions.com>.
On Sep 22, 2009, at 8:51 PM, Mark A. Matienzo wrote:

>> Is there any way to configure in solrconf.xml (or anywhere else)  
>> what fields
>> to return by default?
>
> Yes - in one of the requestHandler sections of solrconfig.xml, you can
> specify defaults for specific query parameters. For example, you could
> modify the configuration for stock search handler for the type of data
> you mentioned as follows:
>
>  <requestHandler name="standard" class="solr.SearchHandler">
>    <!-- default values for query parameters -->
>     <lst name="defaults">
>       <str name="fl">author,title,publisher,date,subject</str>
>     </lst>
>  </requestHandler>
>
> --
> Mark A. Matienzo
> Applications Developer, Digital Experience Group
> The New York Public Library


Resolved. Tastes great; less filling, and it is a small world. Thanks!

-- 
Eric Morgan


Re: returning stored fields

Posted by "Mark A. Matienzo" <ma...@matienzo.org>.
Hi Eric,

On Tue, Sep 22, 2009 at 8:41 PM, Eric Lease Morgan
<er...@infomotions.com> wrote:
>
> Is there any way to configure in solrconf.xml (or anywhere else) what fields
> to return by default?

Yes - in one of the requestHandler sections of solrconfig.xml, you can
specify defaults for specific query parameters. For example, you could
modify the configuration for stock search handler for the type of data
you mentioned as follows:

  <requestHandler name="standard" class="solr.SearchHandler">
    <!-- default values for query parameters -->
     <lst name="defaults">
       <str name="fl">author,title,publisher,date,subject</str>
     </lst>
  </requestHandler>

Mark A. Matienzo
Applications Developer, Digital Experience Group
The New York Public Library