How to debug solr exceptions/warnings for Alfresco (Part 3)

Some good to know stuff having followed debugging which I thought I’d share.

First of all, to find out the node ref of a node id do the following SQL:

  SELECT CONCAT(store.protocol,'://',store.identifier,'/',node.uuid), node.id, node.audit_creator, node.audit_created, node.audit_modifier, node.audit_modified,
       node.audit_accessed
  FROM alf_node node
  LEFT JOIN alf_store as store ON store.id=store_id
  WHERE node.id in ('4777883', '4777625');

Next just use the node browser or Alfresco Share to find your node and its info.

If you are having problem with a node and want to exclude it from the index, have a look at http://docs.alfresco.com/4.2/concepts/admin-indexes.html. There it is described how to exclude a node from the Solr index. Or just disable content indexing, or metadata indexing.

Just apply the aspect and set the properties accordingly on a node and it will be indexed according to the rules described on the page. In my case I had to deactivate content indexing for some failing nodes due to corrupt content (but correct metadata).

function disableContentIndexingFor(nodeRef) {
  var node = search.findNode(nodeRef);

  node.properties["cm:isContentIndexed"] = false;  //Disable content index on the node
  node.properties["cm:isIndexed"] = true; //Allow metadata index on the node

  node.save();
}

disableContentIndexingFor("workspace://SpacesStore/cafebabe-cafe-babe-cafe-babecafebabe");

How to debug solr exceptions/warnings for Alfresco (Part 1)
How to debug solr exceptions/warnings for Alfresco (Part 2)

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>