lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <>
Subject Re: Extending solr analysis in index time
Date Sun, 11 Jan 2015 15:45:31 GMT
You would do that with a custom similarity (scoring) class. That's an
expert feature. In fact a SUPER-expert feature.

Start by completely familiarizing yourself with how TF*IDF  similarity
already works:

And to use your custom similarity class in Solr:

-- Jack Krupansky

On Sun, Jan 11, 2015 at 9:04 AM, Ali Nazemian <> wrote:

> Hi everybody,
> I am going to add some analysis to Solr at the index time. Here is what I
> am considering in my mind:
> Suppose I have two different fields for Solr schema, field "a" and field
> "b". I am going to use the created reverse index in a way that some terms
> are considered as important ones and tell lucene to calculate a value based
> on these terms frequency per each document. For example let the word
> "hello" considered as important word with the weight of "2.0". Suppose the
> term frequency for this word at field "a" is 3 and at field "b" is 6 for
> document 1. Therefor the score value would be 2*3+(2*6)^2. I want to
> calculate this score based on these fields and put it in the index for
> retrieving. My question would be how can I do such thing? First I did
> consider using term component for calculating this value from outside and
> put it back to Solr index, but it seems it is not efficient enough.
> Thank you very much.
> Best regards.
> --
> A.Nazemian

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message