Re: [Django] #30637: SearchVectorField and SearchVector should be combinable.

2024-03-11 Thread Django
#30637: SearchVectorField and SearchVector should be combinable.
-+-
 Reporter:  Dani Hodovic |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.postgres |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  db, postgres, full-  | Triage Stage:  Accepted
  text, search   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ülgen Sarıkavak):

 * cc: Ülgen Sarıkavak (added)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e31357ef3-ddb0d1ad-df7a-45d1-8239-ca035e2f820e-00%40eu-central-1.amazonses.com.


Re: [Django] #30637: SearchVectorField and SearchVector should be combinable.

2020-05-25 Thread Django
#30637: SearchVectorField and SearchVector should be combinable.
-+-
 Reporter:  Dani Hodovic |Owner:  Ehsan
 |  Poursaeed
 Type:  Bug  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  db, postgres, full-  | Triage Stage:  Accepted
  text, search   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Alexandr Tatarinov):

 I have taken a look, and not sure about the desired result. Should we
 a) avoid ::text cast
 b) allow SearchVectorField and SearchVector combination without changing
 the produced query
 c) both?

 I doubt the database can use the index when two fields are combined, and I
 can't see the index being used anyway in both queries provided.
 So the performance problems should come from ::text cast?
 Because SearchVectorField can be null, we still need to wrap it with
 Coalesce. So the resulting query is something like this, correct me if I'm
 wrong.
 Please, test whether this will change the execution time.


 {{{
 EXPLAIN ANALYZE SELECT "jobs_jobposting"."id",
"jobs_jobposting"."role",
"jobs_jobposting"."text",
(to_tsvector(COALESCE("jobs_jobposting"."role", '')) ||
 COALESCE("jobs_jobposting"."text_search", to_tsvector(''))) AS "full_text"
   FROM "jobs_jobposting"
  WHERE (to_tsvector(COALESCE("jobs_jobposting"."role", '')) ||
 COALESCE("jobs_jobposting"."text_search", to_tsvector(''))) @@
 (plainto_tsquery('foo')) = true
  LIMIT 21;
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.ad98e56e05f10b9660ab44a6148f2176%40djangoproject.com.


Re: [Django] #30637: SearchVectorField and SearchVector should be combinable.

2019-08-01 Thread Django
#30637: SearchVectorField and SearchVector should be combinable.
-+-
 Reporter:  Dani Hodovic |Owner:  hsnprsd
 Type:  Bug  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  db, postgres, full-  | Triage Stage:  Accepted
  text, search   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by hsnprsd):

 * status:  new => assigned
 * owner:  (none) => hsnprsd


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.89611c6fa27e5c2be31cb56fddbb1848%40djangoproject.com.


Re: [Django] #30637: SearchVectorField and SearchVector should be combinable. (was: Django is unable to combine SearchVectorField and SearchVector)

2019-07-15 Thread Django
#30637: SearchVectorField and SearchVector should be combinable.
-+-
 Reporter:  Dani Hodovic |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  db, postgres, full-  | Triage Stage:  Accepted
  text, search   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * type:  Cleanup/optimization => Bug
 * version:  2.2 => master
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report. Agreed, `SearchVector` and `SearchVectorField`
 should be combinable, e.g.
 {{{
 JobPosting.objects.annotate(full_text=(SearchVector('role') +
 F('text_search'))).filter(full_text=SearchQuery('foo'))
 }}}

-- 
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/069.749ba29508672736a491c37592f2f72b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.