#33459: Explain how to optimize full text search with SearchVectorField and
GinIndex
-------------------------------------+-------------------------------------
     Reporter:  Thomas Aglassinger   |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  4.0
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  postgres             |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Thomas Aglassinger):

 Replying to [comment:4 Mariusz Felisiak]:
 > Thanks for this ticket, however indexes are standard optimization
 techniques that are helpful in most cases not only for `SearchVectorField`
 and as such it's already mentioned in
 [https://docs.djangoproject.com/en/4.0/topics/db/optimization/#use-
 standard-db-optimization-techniques docs]. I don't see any particular
 reason to document this in detail for `SearchVectorField`, the current
 docs seems sufficient to me.

 The difference with full text search is that you cannot use the standard
 indexes but have to use the particular `GinIndex` or` GistIndex` only
 provided by postgres. Also there is no real point using them with the text
 fields of your model, which I had intuitively assumed. They are only
 really useful in combination with the `SearchVectorField`.

 The current documentation does not point this out despite it being rather
 simple to show with an example.

 > It's looks like a topic for a nice blog post.

 There are plenty of blogs on the topic (I linked only one), but they are
 much more elaborate and cover more ground. I believe adding a simple
 example of combining `SearchVectorField` with `GinIndex` would help quite
 a few people that try to utilize the full text search in an efficient
 manner.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33459#comment:5>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.18fcaa39b562c97fab4ba6a83e08873b%40djangoproject.com.

Reply via email to