sorry Eric... I did not phrase it right ... what I meant was the field is
there in the schema, but I do not have values for it when normal indexing
happens.
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.

What could be the best way to dynamically add value to this field based on
a query parameter and sort on this field also.

Will a custom component help, with code in the *process *method to access
the results one by one and plug in this field help?
If so do I need to first index the value inside the *process *method for
reach result or is there a way to just add this value to each of my results
doc (no indexing) iterating through the result set and plugging in this
value for each result.

How will sort be applicable on this dynamically populated field as I am
already working on the results and is it too late to specify a sort and if
so how could it be possible.

Thanks!
Mark.






On Tue, May 31, 2016 at 11:10 AM, Erick Erickson <erickerick...@gmail.com>
wrote:

> I really don't understand this. If you don't have
> "fieldnew", where is the value coming from? It's
> not in the index so....
>
> If you mean you're _adding_ a field after the index
> already has some docs in it, then the normal
> sort rules apply and you can specify sortMisingFirst/Last
> to tell Solr where other docs without that field shold go.
>
> Normal sort rules are '&sort=field1 asc,field2 desc' etc.
>
> Best,
> Erick
>
> On Tue, May 31, 2016 at 7:53 AM, Mark Robinson <mark123lea...@gmail.com>
> wrote:
> > Hi,
> >
> > My core does not have a field say *fieldnew*.
> >
> > *Case 1:-*
> > But in my results I would like to have *fieldnew *also and my results
> > should be sorted on only this new field.
> >
> > *Case 2:-*
> > Just adding one more case further.
> > Suppose I have other fields also in the sort criteria and *fieldnew *is
> one
> > among them, in that case how do I realize this multi field sort also.
> >
> > Could some one suggest a way pls.
> >
> > Thanks!
> > Mark.
>

Reply via email to