Hi,
I am using solr to index data from binary files using BinURLDataSource.  I
was wondering if anyone knows how to extract an excerpt of the indexed data
during search.  For example if someone made a search it would return 200
characters as a preview of the whole text content.  I read online that hl
would do the trick.  I tried it even though I am not as interested in
highlighting as I am in pulling the excerpt.  However, so far I have not
been able to make it work.

I added a /browse requestHandler to my solrconfig.xml like this:

<requestHandler name="/browse" class="solr.SearchHandler">
    <lst name="defaults">
          <str name="echoParams">explicit</str>
           <str name="hl">true</str>
           <str name="hl.simple.pre">[HIGHLIGHT]</str> 
            <str name="hl.simple.post">[/HIGHLIGHT]</str> 
            <str name="hl.fl">text title</str>
            <str name="hl.useFastVectorHighlighter">true</str>
            <str name="hl.fragmentsBuilder">colored</str>
            <str name="hl.snippets">3</str>
            <int name="hl.fragsize">70</int>
            <str name="hl.mergeContiguous">true</str>
           <float name="hl.regex.slop">0.5</float>
            
            <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
    </lst>
  </requestHandler>

I tried it in other requestHandlers as well without any success.
Does anyone have some hints?  Thanks In advance.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Extracting-excerpt-from-solr-tp4049067.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to