Comments (5)
from spirit.
Can you guide me on how to implement this missing functionality? I would like to retrieve individual comments matching the search.
from spirit.
It's a lot of work. I think most search functionality lives in https://github.com/nitely/Spirit/tree/master/spirit/search . You'll need to add the comment version of it. Things like a search index, views, forms, urls, templates, etc.
For a comment you'll have fields like text (this field must contain the comment text, the search index will use it for searching on it, and it's generated by a template like this , see the haystack docs), comment_id, comment_html, and is_removed at least.
from spirit.
Also, there is a task for indexing topics every time one is created here. You'll need to do the same for comments.
from spirit.
For an initial implementation, I was able to modify spirit.search.views to extract comments from the search results and find only the matching comments and display them. May not scale well for large sites.
from spirit.
Related Issues (20)
- cannot change password when forget HOT 7
- Search function not work HOT 17
- Some tests misusing assertTrue for comparisons
- Security concern HOT 3
- Upgrade Django to the latest 3.2.14 security patch if you can; otherwise this is not usable anymore. HOT 3
- Upgrade to django 4 HOT 1
- spirit-project.com broken HOT 2
- How to make the site available only for logged in users? HOT 1
- Server error when USE_TZ = False HOT 7
- What is the easiest way to put multiple fields on a form on the same line? HOT 1
- Improve settings validations
- Have setting SPIRIT_AUTH_USER_MODEL (defaults to the AUTH_USER_MODEL) but can be overridden HOT 5
- Search always says: There are no search results. HOT 4
- Does every topic have to be subscribed to in order to get notified? HOT 1
- How do I embed a youtube video in a post? HOT 1
- Is it possible to include iframe element in a comment?
- Can you explain the "flags" feature? HOT 1
- How do I make Haystack search case insensitive?
- How do I make Search available for anonymous users? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spirit.