You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by David Xiao <da...@gmail.com> on 2007/05/01 09:45:49 UTC

suppress xml result of document contents

Hello,

 

I am using parameter: “hl=true&hl.fl=features” to query fragment. I receive following xml result from solr server:

 

- <result name="response" numFound="1" start="0">

      <doc>

            <arr ….other attributes 111/>

            <arr ….other attributes 222 />

            <arr name="features">

                    <str>Full document contents comes here, Blah blah ………</str>

      </doc>

  </result>

- <lst name="highlighting">

      <lst name="docid123">

           <arr name="features">

                  <str> document fragment comes here…</str>

          </arr>

     </lst>

  </lst>

 

 

For the sake of performance, I want to suppress output of <arr name="features"> which inside <doc>. But <lst name="highlighting"> need to be reserved.

 

Is that possible, by modify somewhere of solr configuration, without touch java code?

 

 

 

Regards,

David


Re: suppress xml result of document contents

Posted by Chris Hostetter <ho...@fucit.org>.
In teh future, please direct questions like this about "using" solr to the
solr-user list ... it has more subscribers so there are more people to
offer advice.

: For the sake of performance, I want to suppress output of <arr
: name="features"> which inside <doc>. But <lst name="highlighting"> need
: to be reserved.

just specify an "fl" list which doesn't inlcude "features" ... there is no
way to turn off the entire <result> block, but you can specify an "fl" of
only one field (your uniqueKey perhaps?) to keep the output small.


(Perhaps we should add an hl.rows param which defaults to the value of
"rows" .. that way people that only care about highlighting can say
"...&rows=0&hl.rows=10&..." ?)



-Hoss