This new module treats each comment like a document and indexes them separately. It then treats "comment" as a content type, meaning you can facet on type:comment and just see comments.

Interestingly this module also solves the age old problem (seemingly unsolvable) of getting page=x right in the URL (node/3?page=5#comment-456) when the comments are not on the first page.

Committing attached patch.

Comments

robertdouglass’s picture

Status: Needs review » Needs work

The "deep linking" permalinks for comments don't always work. Maybe it's something wrong the the devel generated comments I'm testing with. Have to try with a real data set later. They work most of the time, though, which is better than D5 or D6 were able to do, afaik.

robertdouglass’s picture

StatusFileSize
new1.51 KB

Some bugfixes.

robertdouglass’s picture

StatusFileSize
new2.02 KB

Comment access isn't respected by the current code. Something like this needs to happen, but this doesn't work. A refactoring of the query object is needed :(

robertdouglass’s picture

StatusFileSize
new2.14 KB

Better handling of status and reindexing when comment is changed.

robertdouglass’s picture

#4 has been committed to 6.2. #3 hasn't been.

robertdouglass’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jpmckinney’s picture

Title: New contrib module: comment search » comments are added to search index without checking access
Status: Closed (fixed) » Active

#3 has not been committed, but we need something like the commented-out section to respect access permissions. Follow #680992: comments are added to search index without checking access in core.

pwolanin’s picture

I confirmed with the rest of the Drupal Security Team that given the existing public disclosures around this access-bypass bug, we should fix in public.

Likely we will want to try to use the same approach that's picked for the Drupal 6 backport in #680992: comments are added to search index without checking access

jpmckinney’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Category: feature » bug
nick_vh’s picture

Status: Active » Closed (cannot reproduce)

Since we don't have a commentsearch contrib module in D7 and we are using the comments from the node itself using the core update_index hooks I am quite certain this bug does not exists in the D7 branch.

If a separate indexer would be made for the comments (in contrib) this might be interesting as a reference. Closing it for now