On 18-Apr-08, at 2:47 AM, Christian Wittern wrote:
Martijn Dekkers wrote:
Did you look at the hl.fragsize parameter? the default for that is 100. try:

http://localhost:8983/solr/select/?q=%E8%99%9B%E5%A4%9A&fl=variants,content,cdata,id%2Cdoctitle%2Chead%2Ccitekey%2Cseqnum%2Cjuan&hl=true&f.contents.hl.snippets=20&hl.fl=content,variants&wt=xml&tr=solr-tei.xsl&hl.fragsize=500


Thanks Martijn, with this URL, I do indeed get the whole match. Maybe I am not understanding the meaning of the hl.fragsize correctly. I was assuming that it would grab content in similar sizes to the left and right of the match with the default fragmenter.

Fragments are generated independently from matching (I realize this isn't an ideal algorithm).

Maybe I should try to use the regex fragmenter instead, but this seems to be 1.3 only? Another related question: Is there a way to insert some limiters between fragments so that it is clearly visible that these are chunks of text with gaps in between? I understand that hl.simple.pre and *.post are for surrounding the match, not the snippet, right?

Fragments are returned as an xml list; you can combine them together however you like in client code. Solr can merge adjacent fragments for you if you wish.

-Mike

Reply via email to