: When a query comes in, I want to populate value for this field in the : results based on some values passed in the query. : So what needs to be accommodated in the result depends on a parameter in : the query and I would like to sort the final results on this field also, : which is dynamically populated.
populated how? ... what exactly do you want to provide at query time, and how exactly do you want it to affect your query results / sorting? The details of what you *think* you mean matter, because based on the information you've provided we have no way of guessing what your goal is -- and if we can't guess what you mean, then there's no way to imagein Solr can figure it out ... software doesn't have an imagination. We need to know what your documents are going to look like at index time (with *real* details, and specific example docs) and what your queries are going to look like (again: with *real* details on the "some values passed in the query") and a detailed explanation of how what results you want to see and why -- describe in words how the final sorting of the docs you should have already described to use would be determined acording to the info pased in at query time which you should have also already described to us. In general i think i smell and XY Problem... 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 http://www.lucidworks.com/