Closed (fixed)
Project:
Apache Solr Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2009 at 21:20 UTC
Updated:
18 Apr 2011 at 15:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedHere's a start on what a patch could look like.
Comment #2
robertdouglass commentedI'd like to go one step further with comments and give them their own field. So +1 for the approach in #1 with the addition of getting comments on their own. There is relatively significant demand for being able to search comments alone, or, alternatively, to search while ignoring comments. I also think there will be some demand for not indexing comments in an attempt to reduce index size.
Comment #3
robertdouglass commentedComment #4
jpmckinney commentedapachesolr_commentsearch addresses the "searching for comments" issue.
The patch has a syntax error:
I don't think we should special-case the "extra" information added by the comment module.
Maybe what we want to do is not use "body" as the hl.fl, but some other field that lacks the "extra" information?
Comment #5
jpmckinney commentedComment #6
pwolanin commentedDoes the field used for highlighting need to be both indexed and stored? I'd guess it does - which would lead to rather bloating the index.
Comment #7
jpmckinney commentedhl.fl fields must be stored, yes.
Comment #8
pwolanin commentedOk, well I think that means the only reasonable fix is to add the "extra" info into an extra search field that's part of the qf params, so it would be searched, but never part of the snippet.
Comment #9
pwolanin commentedThinking about this made me realize we should also just go ahead and index the comment in a separate field. That allows, at the least, for a different boost for comments versus body text.
Also we had a weird extra setting:
which seems totally redundant to
which allows you to exclude comments for any given node type.
Comment #10
pwolanin commentedre-roll for class name change
Comment #11
pwolanin commentedfix comments
Comment #12
cpliakas commentedOne issue I ran into with this is that users who didn't have the ability to view comments were seeing them in the search results. See #717104: Output of search results show comments even though user has no rights to view. Before applying the patch, we should ensure these permissions are respected.
~Chris
Comment #13
pwolanin commentedhttp://api.drupal.org/api/drupal/modules--comment--comment.module/functi... seems to prevent coments from being indexed at all in this case in D7
Comment #14
cpliakas commentedAgreed. Although there is potential for improvement in terms of how this is handled mainly by core, the important part is that no information is disclosed to the end user.
Comment #15
pwolanin commentedcommitted to 7.x