cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for comments

wichmanne
Champ in-the-making
Champ in-the-making
I'm using version 4.0 and the documentation implies that the search mechanism includes Comments:
http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fsearch-exam...

However, this doesn't seem to be the case.  If I add a comment to a document and then search, the document is not returned in the search list.

Is this the expected behaviour?  Is there some extra configuration to ensure Comments are included within the search?

Thanks,
Edward
8 REPLIES 8

andy
Champ on-the-rise
Champ on-the-rise
Hi

You should find the comment.

The comment is not part of the original documentif I recall correctly
You will have to follow the link back.

Andy

wichmanne
Champ in-the-making
Champ in-the-making
Andy,

Thanks for your reply. 

I have tried (and tried again) but I cannot ever get a Comment to return as a result in a search list.

Why would this not work in my installation?  I am using version 4.

Thanks,
Edward

julio_melo
Champ in-the-making
Champ in-the-making
Same here. I'm using Alfresco Community v4.0.0 (b 3835) schema 5019. It used to work on 3.4.d.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Are you using SOLR or lucene in 4.0?

Andy

julio_melo
Champ in-the-making
Champ in-the-making
I'm using SOLR and this was a clean install from 4.0.b (I did not upgraded from 3.4.d, but I'm using MySQL instead of Postgres). I tried after to solve this by upgrading it to 4.0.d and then I got the same problem described in other post: https://forums.alfresco.com/en/viewtopic.php?f=8&t=43318

callen
Champ in-the-making
Champ in-the-making
Hello,

I have searched many hours for an answer to this, but cannot find a definitive answer:


I have just installed a fresh install version of 4.0.d on win32 OS to evaluate Alfresco. We had looked at it earlier with version 3.2.

The problem we had and still have, is that the items in a data list (contact list for instance) do not show up in either the regular search or advanced search.

Is this something that simply needs to be configured, or is this simply not possible.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Share excludes commments from the search.

Comments are modeled as fmSmiley Tongueost - which is extended from content.
If you go to the node browser - you can find them with TEXT:"<Comment text>"

You would have to do a "join" with several steps to get back to the document to which the comment applies.

Andy

afaust
Legendary Innovator
Legendary Innovator
Hello,

as Andy has pointed out, comments are separate documents / content items and you need to combine results from several layers to achieve a search result as "documents with comment xy".

We did a proof-of-concept last year based on Alfresco 3.4 where we performed a really low-level modification of Alfresco search & indexing. Comments would be included in Lucene documents (Solr not yet functionally ready on 4.0 HEAD at the time) and you could do a search query like +TYPE:"cm:content" +@cm\:name:"Test*" +COMMENT:"Sample Comment".
Such an approach could be possible in 4.0 with Solr as well, but is neither supported nor recommended - you'd have to change / touch major parts of the search subsystem and index server.


The simplest way to go is writing / adapting a web script to perform a two-phase query, as Andy indicated.

Phase one for fmSmiley Tongueost => collect the lowest level cm:content ancestor nodes from results
Phase two for OR-ed list of ancestor nodes and any additional query fragment => display results

Note that the first phase can be rather expensive - not from the Solr query side, but from navigating to ancestors, as this will usually access all the metadata on the nodes traversed. Depending on the amount of comments matched, you may need a blazingly fast DB or well-sized caches with not-too-short TTL values…


Come to think of it, a more scalable but bit more complex approach could be the following (Note: only works properly, if the same read privileges apply to comments as on their content anchor, and you are only interested in the document irregardless of which specific comment matches):
1) Define an aspect (e.g. "comment scope cache") with a property of type d:content
2) Define a rule / policy for new / updated / deleted fmSmiley Tongueost nodes that aggregates all the comments text (not just the modified one) into the aspect property, which should be applied to the cm:content anchor node
3) Perform a regular search and include the aspect property as a selector for "documents with comment X"

Regards
Axel