lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Spam <ps...@mac.com>
Subject Re: Using hl.regex.pattern to print complete lines
Date Fri, 09 Jul 2010 07:08:18 GMT
Ah, this makes sense.  I've changed my regex to "(?m)^.*$", and it works better, but I still
get fragments before and after some returns.
Thanks for the hint!


-Pete

On Jul 8, 2010, at 6:27 PM, Chris Hostetter wrote:

> 
> : If you can use the latest branch_3x or trunk, hl.fragListBuilder=single
> : is available that is for getting entire field contents with search terms
> : highlighted. To use it, set hl.useFastVectorHighlighter to true.
> 
> He doesn't want the entire field -- his stored field values contain 
> multi-line strings (using newline characters) and he wants to make 
> fragments per "line" (ie: bounded by newline characters, or the start/end 
> of the entire field value)
> 
> Peter: i haven't looked at the code, but i expect that the problem is that 
> the java regex engine isn't being used in a way that makes ^ and $ match 
> any line boundary -- they are probably only matching the start/end of the 
> field (and . is probably only matching non-newline characters)
> 
> java regexes support embedded flags (ie: "(?xyz)your regex") so you might 
> try that (i don't remember what the correct modifier flag is for the 
> multiline mode off the top of my head)
> 
> -Hoss
> 


Mime
View raw message