lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: [Highlight] Storing one field, highlight with different analysers
Date Thu, 24 Dec 2015 20:07:11 GMT
Well, actually points 2 and 3 _do_ depend on the stored
data. It's certainly true that the stored data won't
have to be re-analyzed if you're using FVH, but
the original text still needs to be present to highlight
anything that would make sense (consider stopwords,
stemming all that. The user really doesn't want to
see that).

That said, having two identical fields out there and having
to store both is, indeed, redundant. but there's no way I know
of for telling the highlighter "for field1, get the stored
value from field2".

It'd get very hairy to specify though. hl.fl can consist
of multiple fields, you'd want something like a parameter
hl.alias=field1|field3,field6|field5

expressing the idea "for field1 in hl.fl, use the stored data
in field3".

Or maybe something like
hl.analyzers=field1|some_analyzer,field4|some_other_analyzer

I guess the question is why you need to highlight both? Are you
expecting different words to be highlighted depending? That
seems somewhat confusing from a user's perspective...

Best,
Erick

On Tue, Dec 22, 2015 at 12:50 PM, Alessandro Benedetti
<abenedetti@apache.org> wrote:
> Hi guys,
> just went through this use case :
> I have one field A with analysis_A ( for example an edgeNgram tokenised
> text) .
> Then I have one copy field copy_A with analysis_B ( a simple text_general
> would fit).
>
> At this point I should be able to store the term vector for the fields at
> my pleasure ( I can enable one, both or no one) and the standard
> highlighter will perform better.
> It is not a big deal if I store both the fields ( they are small).
>
> But what if I want to store only one ?
>
> According to my knowledge the Standard Highlight will :
> 1) load the stored text ( it is the same for both the fields !!)
> 2) check if we have the term_vector for the field
> 3) if yes, use the term offset to properly highlight the text
> 3a) if not, analyse on the fly the text and highlight
>
> point 2-3 actually don't depend on the text source ( which is the stored
> field and is the same for both the fields) .
>
> Shouldn't be possible to define the analyser to use for the highlight
> independently from the stored text ( it happens the same for the Suggest
> component) ?
>
> Am i missing some parameter of the Standard Highlight ?
> I checked the other highlighters but more or less they behave the same
> related this problem.
>
> Cheers
>
>
>
> --
> --------------------------
>
> Benedetti Alessandro
> Visiting card : http://about.me/alessandro_benedetti
>
> "Tyger, tyger burning bright
> In the forests of the night,
> What immortal hand or eye
> Could frame thy fearful symmetry?"
>
> William Blake - Songs of Experience -1794 England

Mime
View raw message