Re: [Django] #26511: Document how to do a substring search in JSONField

2016-09-10 Thread Django
#26511: Document how to do a substring search in JSONField
--+
 Reporter:  eoinmurray|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  postgres, jsonb   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by timgraham):

 See #27205 for the same issue as it applies to `ArrayField`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.c04b252269859f53ccc71461402326fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26511: Document how to do a substring search in JSONField

2016-08-09 Thread Django
#26511: Document how to do a substring search in JSONField
--+
 Reporter:  eoinmurray|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  postgres, jsonb   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by charettes):

 Here's a [https://github.com/django/django/compare/master...charettes
 :jsonb-fts POC] of what I had in mind.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.bfc61002243813fe3e8a110ff11d95fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26511: Document how to do a substring search in JSONField

2016-08-09 Thread Django
#26511: Document how to do a substring search in JSONField
--+
 Reporter:  eoinmurray|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  postgres, jsonb   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by charettes):

 It looks like what we really need here is support for the `->>` operator
 as `(lhs -> key)::text` is the JSON representation of the string
 (`('"foo"'::jsonb)::text` yields `'"foo"'`).

 I believe this should be done by introducing a new expression for this
 purpose and documenting it.

 In the meantime we could document using `Func('data',
 template="%(expressions)s ->> 'hobby'", output_field=models.TextField())`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.501d31673d9b115ea78cc5512f607201%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26511: Document how to do a substring search in JSONField (was: Django 1.9 and Postgres 9.4 jsonb string containment inside JSONField)

2016-08-09 Thread Django
#26511: Document how to do a substring search in JSONField
--+
 Reporter:  eoinmurray|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  postgres, jsonb   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 Marking as "Patch needs improvement" per Simon's comment, "Searching a
 whole JSON blob seems like a bad practice to me." The technique described
 in comment:3 doesn't work, so it's possible some code changes might also
 be needed to allow the desired behavior.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.3435e92d4d174f6f61ad413cdd6130b8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.