: > q={!frange l=0 incl=false}query({!type=edismax qf="abstract^0.02 : > title^0.08 categorysearch^0.05" boost='eqsim(alltokens,"xyz")' : > v='+tokens5:"xyz" '}) : > : > : > With the above query, I am getting only the results that I want, the ones : > whose score after my FucntionQuery are above 0, but the problem now is that : > the final score for all results is changed to 1, which affects the sorting. : > : > How can I keep the original score that is calculated by the edismax query?
a) Like i said. details matter. In your earlier messages you mentioned that you were wrapping a function arround a query and wanted to not have the function match anythign where the result was 0 -- the suggestions provided have done that. this is the first time you mentioned that you needed the values returned by the function as the scores of the documents (had you mentioned that you might have gotten differnet answers) b) if you look closely at the suggestion from André, you'll see that his specific suggestion will actually do what you want if you follow it -- express the query you want in the "q" param (so you get the scores from it) and then express an "fq" that refers to the "q" query as a variable... : >>>> q=ipod&fq={!frange l=0 incl=false}query($q) c) Based on the concrete example you've given above, i'ts not clear to me that you actually need any of this -- if the above query is giving you the results you want, but you want the scores from the edismax query to be used as the final scores of the function, then there is no need to wrap the query in any sort of function at all, or exclude any 0 values.... this should be exactly what you want... q={!type=edismax qf="abstract^0.02 title^0.08 categorysearch^0.05" boost='eqsim(alltokens,"xyz")' v='+tokens5:"xyz" '} ...why exactly did you think you needed to wrap that query in a function? https://people.apache.org/~hossman/#xyproblem XY Problem Your question appears to be an "XY Problem" ... that is: you are dealing with "X", you are assuming "Y" will help you, and you are asking about "Y" without giving more details about the "X" so that we can understand the full issue. Perhaps the best solution doesn't involve "Y" at all? See Also: http://www.perlmonks.org/index.pl?node_id=542341 -Hoss