On Wed, Oct 15, 2008 at 04:53:07PM -0700, dezok wrote:
>
> Is there a way to config the fields that are sent back directly in the
> solrconfig.xml or schema.xml file?
>
> I don't really want to write my own queryResponseWriter.
>
> I know that "&qt=id,name" works on the URL, but I don't want to send that
> all the time.
>
> It would seem that:
>
>
>
> would be a natural place for it.
In the solrconfig.xml you can set default parameters for the handlers. I
believe this is how you would do what you want in the standard search handler:
<requestHandler name="standard" class="solr.SearchHandler" default="true">
<!-- default values for query parameters -->
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="fl">id,name,score</str>
</lst>
<!-- the rest of the config -->
</requestHandler>
This sets the default 'fl' query parameter to have id,name,score which makes
the default fields returned be the id, the name and the score.
enjoy,
-jeremy
--
========================================================================
Jeremy Hinegardner [EMAIL PROTECTED]