Highlight each query keyword in different color solr -


i want highlight each query keyword in solr response different color.

example query= 'first , second'. want results like:

query results: first random text , second //response end background of 'first' should color 1 , of 'second' should color 2.

i have tried using hl.fragmentsbuilder unable results highlight.

in lucene , fastvectorhighlighter class suport mutil color tag , don't know how implements in solr ,but it's can in lucene :

  fragmentsbuilder fragmentsbuilder= new scoreorderfragmentsbuilder(basefragmentsbuilder.colored_pre_tags,basefragmentsbuilder.colored_post_tags);      fastvectorhighlighter fasthighlighter2=new fastvectorhighlighter(true, true, fraglistbuilder, fragmentsbuilder);   

maybe useful !


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -