You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Burton-West, Tom" <tb...@umich.edu> on 2011/06/10 19:01:29 UTC

FastVectorHighlighter and hl.fragsize parameter set to zero causes exception

According to the documentation on the Solr wiki page, setting the hl.fragsize parameter to  "0" indicates that the whole field value should be used (no fragmenting).   However the FastVectorHighlighter throws an exception

message fragCharSize(0) is too small. It must be 18 or higher. java.lang.IllegalArgumentException: fragCharSize(0) is too small. It must be 18 or higher. at org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder.createFieldFragList(SimpleFragListBuilder.java:36) at org.apache.lucene.search.vectorhighlight.FastVectorHighlighter.getFieldFragList(FastVectorHighlighter.java:177) at org.apache.lucene.search.vectorhighlight.FastVectorHighlighter.getBestFragments(FastVectorHighlighter.java:166) at

I noticed that in Solr 1268 there was an attempt to fix this problem but it apparently did not work.

1)      Is there any plan to implement a feature in FastVectorHighlighter that would behave the same as the regular Highlighter, i.e. return the whole field value when hl.fragsize=0?
2)      Should I edit the wiki entry to indicate that the hl.fragsize=0 does not work with FVH?
3)      Are there other parameters listed in the wiki that should have a note indicating whether they apply to only the regular highlighter or the FVH?

Tom Burton-West


RE: FastVectorHighlighter and hl.fragsize parameter set to zero causes exception

Posted by "Burton-West, Tom" <tb...@umich.edu>.
Thank you Koji,

I'll take a look at SingleFragListBuilder, LUCENE-2464,  and SOLR-1985, and I will update the wiki on Monday.

Tom
________________________________________

There is SingleFragListBuilder for this purpose. Please see:

https://issues.apache.org/jira/browse/LUCENE-2464

> 3)      Are there other parameters listed in the wiki that should have a note indicating whether they apply to only the regular highlighter or the FVH?

FVH doesn't support (or makes no sense):

fragsize=0, mergeContiguous, maxAnalyzedChars, formatter, simple.pre/simple.post,
fragmenter, highlightMultiTerm, regex.*

and FVH support requireFieldMatch but doesn't support per-field override for it.

If you would update wiki, it definitely be very helpful.

Thank you!

koji
--
http://www.rondhuit.com/en/

Re: FastVectorHighlighter and hl.fragsize parameter set to zero causes exception

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Hi Tom,

(11/06/11 2:01), Burton-West, Tom wrote:
> According to the documentation on the Solr wiki page, setting the hl.fragsize parameter to  "0" indicates that the whole field value should be used (no fragmenting).   However the FastVectorHighlighter throws an exception
>
> message fragCharSize(0) is too small. It must be 18 or higher. java.lang.IllegalArgumentException: fragCharSize(0) is too small. It must be 18 or higher. at org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder.createFieldFragList(SimpleFragListBuilder.java:36) at org.apache.lucene.search.vectorhighlight.FastVectorHighlighter.getFieldFragList(FastVectorHighlighter.java:177) at org.apache.lucene.search.vectorhighlight.FastVectorHighlighter.getBestFragments(FastVectorHighlighter.java:166) at
>
> I noticed that in Solr 1268 there was an attempt to fix this problem but it apparently did not work.
>
> 1)      Is there any plan to implement a feature in FastVectorHighlighter that would behave the same as the regular Highlighter, i.e. return the whole field value when hl.fragsize=0?

There is SingleFragListBuilder for this purpose. Please see:

https://issues.apache.org/jira/browse/LUCENE-2464

> 2)      Should I edit the wiki entry to indicate that the hl.fragsize=0 does not work with FVH?

Yes, please!

> 3)      Are there other parameters listed in the wiki that should have a note indicating whether they apply to only the regular highlighter or the FVH?

FVH doesn't support (or makes no sense):

fragsize=0, mergeContiguous, maxAnalyzedChars, formatter, simple.pre/simple.post,
fragmenter, highlightMultiTerm, regex.*

and FVH support requireFieldMatch but doesn't support per-field override for it.

If you would update wiki, it definitely be very helpful.

Thank you!

koji
-- 
http://www.rondhuit.com/en/