-
-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would it be better to index Comment rather than Topic? #326
Comments
If you want to find all topics talking about X then the current search is
fine.
Returning comments and searching on a single post is missing functionality.
…On Sun., Oct. 8, 2023, 3:48 a.m. sureshvv, ***@***.***> wrote:
Currently Search returns the Topic but the search item is buried deep
inside it - so one has to do a Find in page using the browser.
—
Reply to this email directly, view it on GitHub
<#326>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM6L42QA5ILC7HUYBDTTB3X6JED5AVCNFSM6AAAAAA5XPGCDSVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTCNRXGM2DGMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Can you guide me on how to implement this missing functionality? I would like to retrieve individual comments matching the search. |
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. |
Also, there is a task for indexing topics every time one is created here. You'll need to do the same for comments. |
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. |
Currently Search returns the Topic but the search item is buried deep inside it - so one has to do a Find in page using the browser.
The text was updated successfully, but these errors were encountered: