Hi there,

I'm using latest dev of both Apachesolr_Views and Views-3.0 modules. I created a sample view, and here is its export:

$view = new view;
$view->name = 'apachesolr_view';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'apachesolr_node';
$view->is_cacheable = FALSE;
$view->api_version = 3.0-alpha1;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Node: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'apachesolr_node_node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Filter: Apache Solr: Search */
$handler->display->display_options['filters']['text']['id'] = 'text';
$handler->display->display_options['filters']['text']['table'] = 'apachesolr_node';
$handler->display->display_options['filters']['text']['field'] = 'text';
$handler->display->display_options['filters']['text']['exposed'] = TRUE;
$handler->display->display_options['filters']['text']['expose']['operator'] = 'text_op';
$handler->display->display_options['filters']['text']['expose']['label'] = 'Apache Solr: Search';
$handler->display->display_options['filters']['text']['expose']['use_operator'] = 0;
$handler->display->display_options['filters']['text']['expose']['identifier'] = 'text';
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'apache_solr';

and YES, I have indexed documents in apachesolr :D, I tried ordinary apachesolr search and it returns result while the view is not.

Comments

chrisrikli’s picture

Issue tags: +ApacheSolr

I'm seeing the same issue, with the following modules:
ApacheSolr: 6.x-2.x-dev
ApacheSolr Views: 6.x-1.x-dev
Views: 6.x-3.x-dev

Here's the view export (and I have 4096 nodes in the indexed; I've cleared/re-indexed several times):


$view = new view;
$view->name = 'solr_designresources';
$view->description = 'Solr: Design Resources';
$view->tag = 'Solr';
$view->view_php = '';
$view->base_table = 'apachesolr_node';
$view->is_cacheable = FALSE;
$view->api_version = 3.0-alpha1;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Empty text: Global: Text area */
$handler->display->display_options['empty']['area']['id'] = 'area';
$handler->display->display_options['empty']['area']['table'] = 'views';
$handler->display->display_options['empty']['area']['field'] = 'area';
$handler->display->display_options['empty']['area']['label'] = '';
$handler->display->display_options['empty']['area']['empty'] = FALSE;
$handler->display->display_options['empty']['area']['content'] = 'No results';
/* Field: Apache Solr: Search Snippet */
$handler->display->display_options['fields']['snippet']['id'] = 'snippet';
$handler->display->display_options['fields']['snippet']['table'] = 'apachesolr_node';
$handler->display->display_options['fields']['snippet']['field'] = 'snippet';
$handler->display->display_options['fields']['snippet']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['snippet']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['snippet']['alter']['trim'] = 0;
$handler->display->display_options['fields']['snippet']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['snippet']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['snippet']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['snippet']['alter']['html'] = 0;
$handler->display->display_options['fields']['snippet']['hide_empty'] = 0;
$handler->display->display_options['fields']['snippet']['empty_zero'] = 0;
$handler->display->display_options['fields']['snippet']['num_snippets'] = '1';
$handler->display->display_options['fields']['snippet']['fragsize'] = '100';
/* Field: Apache Solr: Type */
$handler->display->display_options['fields']['type']['id'] = 'type';
$handler->display->display_options['fields']['type']['table'] = 'apachesolr_node';
$handler->display->display_options['fields']['type']['field'] = 'type';
$handler->display->display_options['fields']['type']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['type']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['type']['alter']['trim'] = 0;
$handler->display->display_options['fields']['type']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['type']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['type']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['type']['alter']['html'] = 0;
$handler->display->display_options['fields']['type']['hide_empty'] = 0;
$handler->display->display_options['fields']['type']['empty_zero'] = 0;
$handler->display->display_options['fields']['type']['link_to_node'] = 0;
$handler->display->display_options['fields']['type']['machine_name'] = 0;
/* Field: Apache Solr: Search Score */
$handler->display->display_options['fields']['score']['id'] = 'score';
$handler->display->display_options['fields']['score']['table'] = 'apachesolr_node';
$handler->display->display_options['fields']['score']['field'] = 'score';
$handler->display->display_options['fields']['score']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['score']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['score']['alter']['trim'] = 0;
$handler->display->display_options['fields']['score']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['score']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['score']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['score']['alter']['html'] = 0;
$handler->display->display_options['fields']['score']['hide_empty'] = 0;
$handler->display->display_options['fields']['score']['empty_zero'] = 0;
$handler->display->display_options['fields']['score']['set_precision'] = 0;
$handler->display->display_options['fields']['score']['precision'] = '0';
/* Field: Node: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'apachesolr_node_node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Sort criterion: Apache Solr: Search Score */
$handler->display->display_options['sorts']['score']['id'] = 'score';
$handler->display->display_options['sorts']['score']['table'] = 'apachesolr_node';
$handler->display->display_options['sorts']['score']['field'] = 'score';
$handler->display->display_options['sorts']['score']['order'] = 'DESC';
/* Filter: Apache Solr: Search */
$handler->display->display_options['filters']['text']['id'] = 'text';
$handler->display->display_options['filters']['text']['table'] = 'apachesolr_node';
$handler->display->display_options['filters']['text']['field'] = 'text';
$handler->display->display_options['filters']['text']['exposed'] = TRUE;
$handler->display->display_options['filters']['text']['expose']['operator'] = 'text_op';
$handler->display->display_options['filters']['text']['expose']['label'] = 'Apache Solr: Search';
$handler->display->display_options['filters']['text']['expose']['use_operator'] = 0;
$handler->display->display_options['filters']['text']['expose']['identifier'] = 'text';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_2');
$handler->display->display_options['path'] = 'test/solr';
chrisrikli’s picture

Just to make sure it wasn't an case of other modules causing issues, I built a fresh D6 install...same (lack of) results. :(

chrisrikli’s picture

Figured it out.

Make sure that the "schema.xml" and "solrconfig.xml" files in the "conf" directory of the site's directory in solr match those downloaded with the apachesolr module.

E.g., at /admin/settings/apachesolr/index you should see
Using schema.xml version: drupal-1.9.6 (at the time of this writing)
*not*
Using schema.xml version: drupal-0.9.2

Apropos of this bug report, apachesolr_views sets the "fq" parameter to "entity:node". This field didn't exist in the 0.9.x schema.xml files.

Scott Reynolds’s picture

Issue tags: -ApacheSolr

removing tags

Remon’s picture

Status: Active » Fixed

Thank you very much chrisrikli for the hint :D, view works now.

rjbrown99’s picture

FWIW, 1.9.6 is the latest schema for the apachesolr 6.x-2.x branch.

You might want to read this:
http://drupal.org/node/700358#comment-2544800

Per that comment, Apachesolr 6.x-1.x is the supported version that works with apachesolr_views. Maybe it has changed recently but I ran into a bunch of challenges with 2.x.

cglusky’s picture

re #6 maintainer just confirmed latest Apache Solr Views is now only compatible with 6.x-2.x branch of Solr

#700358: Solr Views returning excluded node types when they have comments

Status: Fixed » Closed (fixed)

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