Support » Plugin: WP Search » [Plugin: WP Search] Index Taxonomies?

  • I need and hack to index also all term of any taxonomies of each post.
    It works ok, but search excerpt display all terms…

    I patched Phplucene.php file on drivers subfolder, near

    $addc=””; $taxonomies=get_taxonomies();
    foreach ($taxonomies as $taxonomy ) {
    $terms=wp_get_object_terms( $post->ID, $taxonomy, null);
    foreach ($terms as $term) {
    $dr= (array) $term;
    $addc .= $dr[“name”].” “;
    $post->post_content .= $addc;


    $comments = ($index_comments ? $this->_getCommentsAsString($post->ID) : FALSE);
    $categories = ($index_categories ? $this->_getCategoriesAsStrings($post->ID) : FALSE);
    # WPSearch_Log::add(‘debug’, “Indexing post: $post->ID”);
    $index->addDocument($this->_createLuceneDocument($post, $categories, $comments));

  • The topic ‘[Plugin: WP Search] Index Taxonomies?’ is closed to new replies.