Add a variable, apachesolr_index_comments_with_node (TRUE | FALSE) which controls whether or not comments are globbed onto nodes during indexing. There is no UI for this, so at this point you have to use $conf in $settings.php to set the variable.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | comment-exclusion-580404-D5.patch | 3.09 KB | claudiu.cristea |
| #10 | comment-exclsion-580404-10.patch | 2.33 KB | pwolanin |
| #9 | comment-exclsion-580404-9.patch | 1.67 KB | pwolanin |
| #8 | comment-exclsion-580404-8.patch | 1.51 KB | pwolanin |
| #1 | index_comments.patch | 2.65 KB | robertdouglass |
Comments
Comment #1
robertdouglass commentedCommitting this.
Comment #2
robertdouglass commentedComment #3
Scott Reynolds commentedI just Ran into this problem and did something more hack-ish because I needed on a per node type.
Would you consider switching this to a per node type setting?
Comment #4
robertdouglass commentedHmm. I'd consider it. Maybe you can roll a patch against this commit?
My next step is to create a module that indexes comments as documents so that you can search for comments exclusively.
Comment #5
pwolanin commentedIndeed - per node type does seem like the appropriate level of selection.
For 2.x, we should think about several possible options, including:
Depending on getting the highlighting right, some variant of #2 would be good since it would allow you to search node only, node + comments, or comments only either as user options or admin options without reindexing and without duplicating the other meta data.
Comment #6
Scott Reynolds commentedTo piggy back off of 2, you could then specify a mlt that only looks at the node body, instead of body + comments
Which would be a big win I think.
Comment #7
robertdouglass commentedOk. I agree with all that. I don't think, though, that we want to pollute our interface with that level of complexity, and we also don't want to automatically implement every strategy because it causes index bloat. So I'm open to ideas about how we can architect it to be lean and mean, but give the admin the right amount of flexibility without overwhelming. Suggestions?
Comment #8
pwolanin commentedHere's a patch for 1.x for per-type exclusion.
Comment #9
pwolanin commentedwith README change
Comment #10
pwolanin commented+ code comment
Comment #11
pwolanin commentedcommitted #10 to 6.x-1.x
Comment #12
pwolanin commentedneeds to be ported to other branches
Comment #13
robertdouglass commentedCommitted to DRUPAL-6--2
Comment #14
claudiu.cristeaHere's the patch against 5.x-2.x-dev
Comment #15
claudiu.cristeaCommitted to CVS in #278734
Comment #17
dark_religion commentedI had this problem. And couldn't solve it for a long time lol...
Comment #19
sthumuluri commentedHi, I am trying to implement functionality to exclude comments from all of our nodes from indexing - is "apachesolr_index_comments_with_node" the variable that needs to be set in settings.php? When I look in the code - I do not see that variable being checked instead I see "apachesolr_exclude_comments_types". can you pls clarify?
Comment #20
quotesbro commentedI guess you looked in 6.x-1.x branch. This future was added to 6.x-2.x branch.
Comment #21
quotesbro commented