There are a couple of things that we should add to OC: (Indexing those fields below in OC and provide suggestions)

1. Title
2. Any additional text fields or text area fields

Sometimes this might not apply and we might just wanna index the body field but in most cases it makes sense to index additional textfields and textareas. We also need to balance out so that user does not have to put a lot of additional configuration "per content type"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xcf33’s picture

FileSize
2.38 KB

Attached is a first attempt to just automatically "add" all the textfield and text area as well as title into a long html string and sent to OC to process.

xcf33’s picture

Status: Active » Needs review
franz’s picture

+++ b/opencalais.module
@@ -356,12 +361,30 @@ function opencalais_get_suggestions(&$node, $opencalais_type = NULL) {
+    // adding all text fields and text area in the node to be ¶

whitespace at the end of string

+++ b/opencalais.module
@@ -356,12 +361,30 @@ function opencalais_get_suggestions(&$node, $opencalais_type = NULL) {
+      ¶

whitespace

+++ b/theme/theme.inc
@@ -86,4 +86,15 @@ function theme_opencalais_add_fields_entities($vars) {
+/**
+ * Theme node fields into html containers
+ */
+function theme_opencalais_node_fields($vars) {
+  $html = $vars['html'];
+  ¶
+  $output = '<h1>' . $html['title'] . '</h1>';
+  foreach ($html['fields'] as $field_items) {
+    $output .= '<div>' . implode('</div><div>', $field_items) . '</div>';
+  }
+  return $output;

This looks like it would be more readable/overrideable in a tpl.php

xcf33’s picture

FileSize
5.25 KB

New patch respecting a new optional configuration per content type, also moved the the theme function into a tpl

ElusiveMind’s picture

Issue summary: View changes

Old ticket I know - but what about a configuration screen in the module that allows you to select which fields are indexed by OC?

ElusiveMind’s picture

Moving this to the head of the line for v1.2 which will start next week

ElusiveMind’s picture

Assigned: xcf33 » ElusiveMind

  • ElusiveMind committed c1a555e on 7.x-1.x
    Issue #2016525 by xcf33: Field index support
    Recent interface change...
ElusiveMind’s picture

Status: Needs review » Reviewed & tested by the community
ElusiveMind’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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