Re: About custom score using Solr8/Lucene8

2020-07-08 Thread Michael Sokolov
You should think of DoubleValuesSource as a factory for DoubleValues. Usually a factory will be immutable - you set it up and then it produces per-leaf DoubleValues. So I don't really understand what you're saying about state there. Regarding the DoubleValues, which is an iterator, yes it definite

Re: About custom score using Solr8/Lucene8

2020-07-07 Thread Vincenzo D'Amore
Thanks Michael, if I understand correctly the DoubleValuesSource is stateful. When getValues is called if scores is null an internal state true/false is saved. This state should be returned by needsScores method. Is this correct? As far as I understood, the same thing happens to the DoubleValue ob

Re: About custom score using Solr8/Lucene8

2020-07-06 Thread Michael Sokolov
That controls whether getValues(LeafReaderContext ctx, DoubleValues scores) gets a null scores parameter or not. You should say true only if you need the text relevance scores computed by the Query's Scorer. On Mon, Jul 6, 2020 at 10:22 AM Vincenzo D'Amore wrote: > > Hi Michael, thanks for answe

Re: About custom score using Solr8/Lucene8

2020-07-06 Thread Vincenzo D'Amore
Hi Michael, thanks for answering my questions. Yes, I read, but I think that it not is enough. For make the things clearer, this is taken from the javadocs: abstract boolean needsScores() - Return true if document scores are needed to calculate values So, I thought return true, because yes, I ne

Re: About custom score using Solr8/Lucene8

2020-07-06 Thread Michael Sokolov
Did you read the DoubleValuesSource javadocs, and find they weren't enough? On Sun, Jul 5, 2020 at 7:54 AM Vincenzo D'Amore wrote: > > Hi all, > > Finally I have a custom DoubleValuesSource that gives the expected results, > but I'm a little worried about the lack of documentation. > > When you e

Re: About custom score using Solr8/Lucene8

2020-07-05 Thread Vincenzo D'Amore
Hi all, Finally I have a custom DoubleValuesSource that gives the expected results, but I'm a little worried about the lack of documentation. When you extend DoubleValuesSource there are a number of methods to write, for some of them it is not clear what they do and why they need to be implemente

Re: About custom score using Solr8/Lucene8

2020-07-03 Thread Vincenzo D'Amore
Hi all, I did few steps forward but still struggling in how read the field value inside my custom DoubleValuesSource final CustomValuesSource valuesSource = new CustomValuesSource(data, req.getSchema().getField(field)); return FunctionScoreQuery.boostByValue

Re: About custom score using Solr8/Lucene8

2020-07-02 Thread Vincenzo D'Amore
Hi Mikhail, I was just trying to understand how to extend DoubleValuesSource class, now I'm looking around to find an inspiring example... On Thu, Jul 2, 2020 at 12:55 PM Mikhail Khludnev wrote: > Hi, Vincenzo. > > Have you tried to implement DoubleValuesSource ? > > On Thu, Jul 2, 2020 at 9:58

Re: About custom score using Solr8/Lucene8

2020-07-02 Thread Vincenzo D'Amore
On Thu, Jul 2, 2020 at 10:32 AM Diego Ceccarelli (BLOOMBERG/ LONDON) < dceccarel...@bloomberg.net> wrote: > Vincenzo, are you talking about > https://lucene.apache.org/core/7_4_0/queries/org/apache/lucene/queries/CustomScoreQuery.html > ? > > Yep. I was just trying to figure it out how to port a c

Re: About custom score using Solr8/Lucene8

2020-07-02 Thread Mikhail Khludnev
Hi, Vincenzo. Have you tried to implement DoubleValuesSource ? On Thu, Jul 2, 2020 at 9:58 AM Vincenzo D'Amore wrote: > Again, @Federico Pici or anybody, did you figure out how to > port CustomScoreQuery in Solr8? > > On Tue, Jul 23, 2019 at 1:05 AM Xiaofei wrote: > > > @Federico Pici, did you

Re: About custom score using Solr8/Lucene8

2020-07-02 Thread Diego Ceccarelli (BLOOMBERG/ LONDON)
score using Solr8/Lucene8 Again, @Federico Pici or anybody, did you figure out how to port CustomScoreQuery in Solr8? On Tue, Jul 23, 2019 at 1:05 AM Xiaofei wrote: > @Federico Pici, did you figure out on how to produce customized score in > Solr > 8? > > > > -- > Sent from

Re: About custom score using Solr8/Lucene8

2020-07-01 Thread Vincenzo D'Amore
Again, @Federico Pici or anybody, did you figure out how to port CustomScoreQuery in Solr8? On Tue, Jul 23, 2019 at 1:05 AM Xiaofei wrote: > @Federico Pici, did you figure out on how to produce customized score in > Solr > 8? > > > > -- > Sent from: > http://lucene.472066.n3.nabble.com/Lucene-Ja

Re: About custom score using Solr8/Lucene8

2019-07-22 Thread Xiaofei
@Federico Pici, did you figure out on how to produce customized score in Solr 8? -- Sent from: http://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Federico Pici
s scoring (or other scoring strategy) trying to follow >>> some >>>> best-practice (and as i can see using CustomScoreQuery is the most >>> preferred >>>> way) >>>> >>>> I was not able to try a solution because of Lucene8 missing >

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Diego Ceccarelli (BLOOMBERG/ LONDON)
@lucene.apache.org Subject: Re: About custom score using Solr8/Lucene8 Diego it could be a nice workaround in case i was not able to perform custom scoring (or in case custom scoring function would generate a slow query) Thanks I still hope i will be able to implement a custom score function in some

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Federico Pici
>>> >>> Also for scores, you might be able to use in-place updates: >>> >>> >> https://lucene.apache.org/solr/guide/6_6/updating-parts-of-documents.html#UpdatingPartsofDocuments-In-PlaceUpdates >>> >>> so no need to reindex all the doc

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Alessandro Benedetti
c using ValueSourceParser (but is this a good > > practice?) > > > > > >> Il giorno 9 mag 2019, alle ore 10:50, Diego Ceccarelli (BLOOMBERG/ > LONDON) > > ha scritto: > >> > >> Hi Federico, > >> > >> Could you give more de

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Federico Pici
UpdatingPartsofDocuments-In-PlaceUpdates > > so no need to reindex all the document. > > > From: java-user@lucene.apache.org At: 05/09/19 11:07:37To: Diego Ceccarelli > (BLOOMBERG/ LONDON ) , java-user@lucene.apache.org > Subject: Re: About custom score using Solr8/Lucene8 > >

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Diego Ceccarelli (BLOOMBERG/ LONDON)
-PlaceUpdates so no need to reindex all the document. From: java-user@lucene.apache.org At: 05/09/19 11:07:37To: Diego Ceccarelli (BLOOMBERG/ LONDON ) , java-user@lucene.apache.org Subject: Re: About custom score using Solr8/Lucene8 Well, my index is basically a list of documents of users. so i

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Federico Pici
ers, > Diego > > From: java-user@lucene.apache.org At: 05/09/19 08:13:35To: > java-user@lucene.apache.org > Subject: Re: About custom score using Solr8/Lucene8 > > Hello Mikhail, > yes i did. I read all the page at > https://issues.apache.org/jira/browse/LUCENE-8099 > &

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Diego Ceccarelli (BLOOMBERG/ LONDON)
: java-user@lucene.apache.org Subject: Re: About custom score using Solr8/Lucene8 Hello Mikhail, yes i did. I read all the page at https://issues.apache.org/jira/browse/LUCENE-8099 <https://issues.apache.org/jira/browse/LUCENE-8099> I still do not understand where/how to start to write a cl

Re: About custom score using Solr8/Lucene8

2019-05-09 Thread Federico Pici
Hello Mikhail, yes i did. I read all the page at https://issues.apache.org/jira/browse/LUCENE-8099 I still do not understand where/how to start to write a class to be embedded in solr8. All available example since 2012 where written around Cu

Re: About custom score using Solr8/Lucene8

2019-05-08 Thread Mikhail Khludnev
Hello. Have you checked the fourth item at http://lucene.apache.org/core/8_0_0/MIGRATE.html ? On Wed, May 8, 2019 at 5:46 PM Federico Pici wrote: > Hi, > > i was trying to implement custom score inside my solr8 instance. > On google i found some examples, all focused on using CustomScoreProvide

About custom score using Solr8/Lucene8

2019-05-08 Thread Federico Pici
Hi, i was trying to implement custom score inside my solr8 instance. On google i found some examples, all focused on using CustomScoreProvider and CustomScoreQuery classes. This classes have been removed in Solr8/Lucene8 and, from Lucene 8 changeling, i saw a developer /contributor saying to use