Search API sorting on DateField using datetime

87 views
Skip to first unread message

Bradley Mclain

unread,
Jun 17, 2016, 1:19:17 AM6/17/16
to Google App Engine
I currently have a service which sorts the data by various datetimes using the search API. This works fine in the development server however once deployed to app-engine the results are no longer correct.

When viewing the indexes using the admin console I can see that in the development server it stores the full datetime object but when deployed to app engine it only has the date portion of the datetime.

Is this intentional? Is there a way to make it store the full datetime? Have I missed something?

Regards,

Brad

Anastasios Hatzis

unread,
Jun 17, 2016, 7:07:26 AM6/17/16
to google-a...@googlegroups.com
Search API supports DateField with no time. If you need sorting by datetime values, conversion between datetime and NumberField (seconds since ...) would be a work-around for your use-case.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/9e875771-81dd-4077-9942-5b348c4614cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Mit freundlichen Grüßen / Kind regards

i. A.
Anastasios Hatzis

Fon: +49 8374 930813
Fax: +49 8374 930810
Mobil: +49 1520 8592878

HATZIS Edelstahlbearbeitung GmbH
Hojen 2
87490 Haldenwang (Allgäu)
Germany

Handelsregister Kempten (Allgäu): HRB 4204
Geschäftsführer: Paulos Hatzis, Charalampos Hatzis
Umsatzsteuer-Identifikationsnummer: DE 128791802
GLN: 42 504331 0000 6

http://www.hatzis.de/

Brad

unread,
Jun 17, 2016, 7:21:12 PM6/17/16
to google-a...@googlegroups.com
 Yes this is the work-around that I have been using. I think the documentation should be updated to reflect this, the python one still says:
  • Date Field - a date object with year/month/day and optional time
Also the development server should really behave in the same way to avoid confusion.

Adam (Cloud Platform Support)

unread,
Jun 19, 2016, 5:18:34 PM6/19/16
to Google App Engine
This is a known issue. Feel free to star the relevant issue tracker for updates and to add visibility.


On Friday, June 17, 2016 at 7:21:12 PM UTC-4, Bradley Mclain wrote:
 Yes this is the work-around that I have been using. I think the documentation should be updated to reflect this, the python one still says:
  • Date Field - a date object with year/month/day and optional time
Also the development server should really behave in the same way to avoid confusion.

On 17 Jun 2016, at 9:07 PM, Anastasios Hatzis wrote:

Search API supports DateField with no time. If you need sorting by datetime values, conversion between datetime and NumberField (seconds since ...) would be a work-around for your use-case.
On 17 June 2016 at 07:19, Bradley Mclain wrote:
I currently have a service which sorts the data by various datetimes using the search API. This works fine in the development server however once deployed to app-engine the results are no longer correct.

When viewing the indexes using the admin console I can see that in the development server it stores the full datetime object but when deployed to app engine it only has the date portion of the datetime.

Is this intentional? Is there a way to make it store the full datetime? Have I missed something?

Regards,

Brad

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.



--

Mit freundlichen Grüßen / Kind regards

i. A.
Anastasios Hatzis

Fon: +49 8374 930813
Fax: +49 8374 930810
Mobil: +49 1520 8592878

HATZIS Edelstahlbearbeitung GmbH
Hojen 2
87490 Haldenwang (Allgäu)
Germany

Handelsregister Kempten (Allgäu): HRB 4204
Geschäftsführer: Paulos Hatzis, Charalampos Hatzis
Umsatzsteuer-Identifikationsnummer: DE 128791802
GLN: 42 504331 0000 6

http://www.hatzis.de/

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.

Bradley Mclain

unread,
Jun 19, 2016, 6:52:14 PM6/19/16
to google-a...@googlegroups.com
Thanks for the the response, I will follow that issue.

On Mon, Jun 20, 2016 at 7:18 AM, 'Adam (Cloud Platform Support)' via Google App Engine <google-a...@googlegroups.com> wrote:
This is a known issue. Feel free to star the relevant issue tracker for updates and to add visibility.

On Friday, June 17, 2016 at 7:21:12 PM UTC-4, Bradley Mclain wrote:
 Yes this is the work-around that I have been using. I think the documentation should be updated to reflect this, the python one still says:
  • Date Field - a date object with year/month/day and optional time
Also the development server should really behave in the same way to avoid confusion.

On 17 Jun 2016, at 9:07 PM, Anastasios Hatzis wrote:

Search API supports DateField with no time. If you need sorting by datetime values, conversion between datetime and NumberField (seconds since ...) would be a work-around for your use-case.
On 17 June 2016 at 07:19, Bradley Mclain wrote:
I currently have a service which sorts the data by various datetimes using the search API. This works fine in the development server however once deployed to app-engine the results are no longer correct.

When viewing the indexes using the admin console I can see that in the development server it stores the full datetime object but when deployed to app engine it only has the date portion of the datetime.

Is this intentional? Is there a way to make it store the full datetime? Have I missed something?

Regards,

Brad

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.



--

Mit freundlichen Grüßen / Kind regards

i. A.
Anastasios Hatzis

Fon: +49 8374 930813
Fax: +49 8374 930810
Mobil: +49 1520 8592878

HATZIS Edelstahlbearbeitung GmbH
Hojen 2
87490 Haldenwang (Allgäu)
Germany

Handelsregister Kempten (Allgäu): HRB 4204
Geschäftsführer: Paulos Hatzis, Charalampos Hatzis
Umsatzsteuer-Identifikationsnummer: DE 128791802
GLN: 42 504331 0000 6

http://www.hatzis.de/

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages