You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Rohit Harchandani <rh...@gmail.com> on 2012/08/29 20:39:09 UTC

Ordering of fields

Hi all,
Is there a way to specify the order in which fields are returned by solr?
Also, is it possible to make solr return a blank/default value for a field
not present for a particular document, apart from giving a default value in
the schema and having it indexed?
Thanks,
Rohit Harchandani

Re: Ordering of fields

Posted by Yonik Seeley <yo...@lucidworks.com>.
In 4.0 you can use the def function with pseudo-fields (returning
function results as doc field values)
http://wiki.apache.org/solr/FunctionQuery#def

fl=a,b,c:def(myfield,10)


-Yonik
http://lucidworks.com


On Wed, Aug 29, 2012 at 2:39 PM, Rohit Harchandani <rh...@gmail.com> wrote:
> Hi all,
> Is there a way to specify the order in which fields are returned by solr?
> Also, is it possible to make solr return a blank/default value for a field
> not present for a particular document, apart from giving a default value in
> the schema and having it indexed?
> Thanks,
> Rohit Harchandani