[Answered ]-How to search web content with blobs or long strings

1👍

Use something like django-watson for full text searching.

Sample model code:

import watson

class Document (models.Model):

    #: Title for the item
    title = models.CharField(max_length=45, blank=False, 
        help_text="Document title")

    #: Description for the item.
    description = models.TextField(blank=False, 
        help_text="Description of the document")

    #: Document text for searching
    doc_text = models.TextField(blank=False, 
        help_text="Searchable document text")

watson.register(Document.objects.all(), fields=("title", "description", 
    "doc_text"))
👤Josh K

1👍

I’m not sure what your question is. Searching on long text fields is exactly what the full-text search API is for.

The FTS service is not directly related to the datastore, which is why that page you quote talks about “documents”. You programmatically create a search document, potentially using some or all of the datastore fields, and you can then search on that.

Leave a comment