I'd try several things....

1> just because you an sort has nothing to do with whether the field is
returned. Sorting uses the indexed data, returning it is the stored data.
So it's a bit of a red herring when you can sort on a field but not see it,
although it is a good test that your schema knows about the field.

2> Try fl=* just for yucks.

3> Check your schema.xml for typos. stroed="true" for instance?

4> Why are you restricting your returns to 1 and only one document? Are you
absolutely sure that that document has the new field? Solr happily sorts
documents that do not have a value for a field, that's the purpose of
sortMissingFirst/Last.

FWIW
Erick


On Wed, Oct 31, 2012 at 9:54 PM, Dotan Cohen <dotanco...@gmail.com> wrote:

> On Thu, Nov 1, 2012 at 2:52 AM, Otis Gospodnetic
> <otis.gospodne...@gmail.com> wrote:
> > Hi,
> >
> > That should work just fine.  It;s either a bug or you are doing something
> > you didn't mention.  Maybe you can provide a small, self-enclosed unit
> test
> > and stick it in JIRA?
> >
>
> I would assume that it's me doing something wrong! How does this look:
>
>
> /solr/select?q=*&rows=1&sort=created_iso8601%20desc&fl=created_iso8601,created
>
> <response>
>   <lst name="responseHeader">
>     <int name="status">0</int>
>     <int name="QTime">1</int>
>     <lst name="params">
>       <str name="q">*:*</str>
>       <str name="rows">1</str>
>       <str name="fl">created_iso8601,created</str>
>     </lst>
>   </lst>
>   <result name="response" numFound="1037937" start="0">
>     <doc>
>       <int name="created">1350854389</int>
>     </doc>
>   </result>
> </response>
>
> Surely the sort parameter would throw an error if the
> created_iso8601field did not exist. That field is indexed and stored,
> with no parameters defined on handlers that may list the fields to
> return as Alexandre had mentioned.
>
>
> --
> Dotan Cohen
>
> http://gibberish.co.il
> http://what-is-what.com
>

Reply via email to