lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Solritas truncates content
Date Tue, 14 May 2013 01:45:32 GMT
#field is defined in conf/velocity/VM_global_library.vm as:

#macro(field $f)
    #set($pad = "")
    #foreach($v in $response.response.highlighting.get($docId).get($f))
      #set($pad = " ... ")
    #foreach($v in $doc.getFieldValues($f))

It's a little ugly because it supports highlighting if a field has an values for that document
in the highlighting section of the response.

But if there is no highlighting, then it outputs each value of a field as-is from the response.
 Are you sure you're getting it truncated?  Try adding &wt=xml to the /browse requests
you're making and see if perhaps the actual value coming back from Solr is the same as what
you're seeing rendered.  Unless it's from highlighting, it should be the same.


On May 13, 2013, at 18:14 , Michael Schmitz wrote:

> Hi, I'm playing around with the example that comes with SOLR 4.  I've
> indexed some documents using the Tika extractor.  I'm looking at the
> velocity templates and trying to figure out how the /browse (solritas)
> functionality works because I would like to add functionality to view the
> complete document content.  Presently, the content field is truncated in
> the results to around 730 characters.  How is this done?  How can I access
> the full text?  I've poked around quite a bit but have not found anything.
> The content field is added to the result set in richtext-doc.vm:
> <div class="result-body">#field('content')</div>
> Any help is greatly appreciated!
> Peace.  Michael

View raw message