I'm not seeing this in my config page, is this a result of outdated documentation, or is something broken ?

I'm trying to play with the views side of things, but seems like this might be a requirement, as I'm not finding "Faceted Search: Environment ID" in the the arguments section of my view.

help :)

Comments

trevorleenc’s picture

I was reading the README.txt linked from the project page..so, now after reading the file provided with the 0.11 download, I found the steps I was taking were wrong...

so, I am now in order...I think...

now when I follow this procedure, I get the following:

* user warning: Table 'drupaldev.drupal_temp_faceted_search_results' doesn't exist query: SELECT count(node.nid) FROM drupal_node node INNER JOIN drupal_temp_faceted_search_results temp_faceted_search_results ON node.nid = temp_faceted_search_results.nid in /home/.wynette/sellcon/dev.sellingconnection.com/includes/database.mysqli.inc on line 151.
* user warning: Table 'drupaldev.drupal_temp_faceted_search_results' doesn't exist query: SELECT node.nid, temp_faceted_search_results.score AS temp_faceted_search_results_score FROM drupal_node node INNER JOIN drupal_temp_faceted_search_results temp_faceted_search_results ON node.nid = temp_faceted_search_results.nid ORDER BY temp_faceted_search_results_score ASC LIMIT 0, 10 in /home/.wynette/sellcon/dev.sellingconnection.com/includes/database.mysqli.inc on line 151.

Looking in MySQL, I do not have a table "drupal_temp_faceted_search_results" (duh, right, lol)

Now, in my "provide page view" I've tried both providing a URL, and not, and I still get these results, however the readme isn't clear as to whether a url should be provided.

at the bottom of this post you'll find the export of my view...very very simple at this point...full nodes..etc...but...back to the missing table, I'm not thinking this has anything to do with my view...as I found this gem:

  function faceted_search($text, $table = 'temp_faceted_search_results') {
    $this->_text = $this->_keywords = $text;
    $this->_results_table = $table;

    // Will parse the given text into facets, stripping parsed text from the
    // search text and leaving only the keywords that do not match any facet.
    $this->_parse_facets();

    // Parse the remaining keywords and create corresponding "keyword" facets.
    $this->_parse_keywords();

    uasort($this->_facets, '_faceted_search_compare_facets');
  }

but...I cannot seem to find anything that creates this table

so, at this point I am going to poke around some more before rolling back to my database backup before I installed faceted search, I'll keep this posted with further information if it becomes available.

   $view = new stdClass();
  $view->name = 'faceted_search_view';
  $view->description = 'faceted_search_view';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'node';
  $view->url = '';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->sort = array (
  );
  $view->argument = array (
  );
  $view->field = array (
  );
  $view->filter = array (
    array (
      'tablename' => 'faceted_search',
      'field' => 'faceted_search_current_search',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(faceted_search);
  $views[$view->name] = $view;
trevorleenc’s picture

Title: Add Environment » Issue Getting Views to Work

*updated title*

David Lesieur’s picture

Title: Issue Getting Views to Work » Views tries to prefix temporary tables
Version: 5.x-0.11 » 6.x-1.x-dev
Component: User interface » Views integration
Category: support » bug
Status: Active » Postponed

The problem you are encountering is Views prefixing temporary tables. Unfortunately, until Views fixes this issue, the only way to avoid it is to avoid prefixing tables in your site's settings.

EvanDonovan’s picture

See my issue http://drupal.org/node/254069 if you haven't figured out how to get this to work yet.

You don't need to avoid prefixing tables, you just need to specify particular tables in settings.php to exclude from prefixing.

David Lesieur’s picture

Evan, that's a perfectly good workaround. Thanks for the tip!

EvanDonovan’s picture

You're welcome - it was all thanks to http://drupal.org/node/129838.

xtfer’s picture

Nice workaround. Solved for me. At least till Views is fixed anyway. +)

EvanDonovan’s picture

Status: Postponed » Active

I just heard from merlinofchaos in #129838: Avoid prefixing temporary tables that Views 2 uses something called a "join handler" to handle joins to non-prefixed tables, so this shouldn't be an issue anymore. Does anyone here know anything about how that could be used to create Faceted Search views?

EvanDonovan’s picture

Priority: Normal » Minor

Probably not high priority, since no one has responded. I *still* use the workaround from #4. Awkward, but it works.

gaele’s picture

Priority: Minor » Normal

The work-around is in the faceted_search README.

From #129838: Avoid prefixing temporary tables: "In Views 2, you can create a new join handler, which can be utilized to create the join without the prefixing, if desired. You can then use that handler in your join definitions when adding temporary tables."

To really solve this the join handler should be provided by faceted_search.

gaele’s picture

Priority: Normal » Minor