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"))
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.
- [Answered ]-How to toggle glyphicon icon on toggle of a span in django templates
- [Answered ]-Django naturaltime Localization error
- [Answered ]-About django url why will be overwrite?
- [Answered ]-Django – a model field which gets the result of model method
Source:stackexchange.com