> On 07.03.2017, at 21:45, Alan Woodward <[email protected]> wrote: > > Hi, I don’t think this was an intentional change, and it looks as though it > would be a fairly easy thing to fix - do you want to open an issue?
I opened an issue at https://issues.apache.org/jira/browse/LUCENE-7744 together with a pull request. Unfortunately, I was not quite right in my understanding how my code worked with lucene 5. Rereading the code, it seems to me now that the PayloadTermQuery itself included a hardcoded default, which by chance was exactly the one I wanted (1.0). So my own scorePayload function probably (did not test this) was never called with null values. - Nathan Gass > > Alan Woodward > www.flax.co.uk > > >> On 7 Mar 2017, at 17:19, Nathan Gass <[email protected]> wrote: >> >> Hello >> >> I'm using PayloadTermQuery and MaxPayloadFunction together with a custom >> similarity which provided a default value for terms without payloads. The >> scorePayload of my custom similarity got called for every term (with or >> without payload) and the resulting score used the maximum of all returned >> values. >> >> When switching to PayloadScoreQuery in lucene 6, this behavior changed. >> scorePayload only gets called for terms with payloads and terms without >> payloads get ignored for the MaxPayloadFunction. Is this change intentional? >> If not I'm happy to create an issue and try to make a patch. >> >> Would there be some other way to achieve my goal? I'd rather not add a >> payload for every term (I'm using delimited_payload_filter in elasticsearch >> and therefore currently do not need any custom analysis plugins). >> >> Greetings >> Nathan Gass >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
