After updating I had the following:

Notice: Undefined index: type en SearchApiViewsQuery->build() (línea 178 de .../sites/all/modules/search_api/contrib/search_api_views/includes/query.inc).

Views 7.3.1
Serach API & Search views 7.1.0

Comments

urlaub’s picture

I can confirm this bug with:

Views 7.3.1
Serach API & Search views 7.1.0

harrrrrrr’s picture

Version: 7.x-1.0-rc1 » 7.x-1.0

confirmed

Views 7.3.1
Serach API & Search views 7.1.0

garethhallnz’s picture

StatusFileSize
new1.13 KB

I too can confirm this problem.

I have attached a patch but it might be a bit of a hack.

tecjam’s picture

Yeah, I have that too in my view.

Search API 7.x-1.x-dev
Views 7.x-3.1

egarias’s picture

The patch #3 worked for me

hrodrig’s picture

I had the same error too... patch #3 worked

a1russell’s picture

StatusFileSize
new1.14 KB

Cleaned up patch from #3 a bit.

a1russell’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1411712.diff, failed testing.

davidseth’s picture

Status: Needs work » Reviewed & tested by the community

#7 works Great! Thanks.

xlyz’s picture

Status: Reviewed & tested by the community » Needs work

it failed a test. shouldn't we investigate a bit?

robhardwick’s picture

Status: Needs work » Needs review
StatusFileSize
new1.02 KB

I was still getting undefined index notices with patch #7 so I've modified the patch a little bit to fix the error. Updated patch attached.

Status: Needs review » Needs work

The last submitted patch, search_api-1411712-12.patch, failed testing.

FredericoT’s picture

StatusFileSize
new1.7 KB

I reworked the patch a little because the current patch assumes the 'type' is the first item in the array. I check all items to see which one is the 'type' and then use that value so it will still work even if it were the last item for instance.
See attached.

FredericoT’s picture

Status: Needs work » Needs review

Forgot to change the status it seems.

Status: Needs review » Needs work

The last submitted patch, search_api-1411712-14.patch, failed testing.

FredericoT’s picture

Status: Needs work » Needs review
StatusFileSize
new1.16 KB

Sorry, I used the wrong patch file. Just went for another cup of coffee, should be fine now.

Status: Needs review » Needs work

The last submitted patch, search_api-1411712-17.patch, failed testing.

hrodrig’s picture

Status: Needs work » Needs review

#17: search_api-1411712-17.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, search_api-1411712-17.patch, failed testing.

jmaties’s picture

subscribing

netsensei’s picture

Status: Needs work » Needs review

Hm. This patch works for me! What else does the testbot want to be happy?

matrixlord’s picture

It works fine for me too! Maybe something like coding standards...

Oleksandr.Masovets’s picture

Status: Needs review » Needs work

The #17 patch is not good. Reasons:
- please, respect Drupal code standards.
- if the $group['conditions'] exists, it is an array but there no "type" value in it the $filter value equals nothing. And it causes the "Call to a member function condition() on a non-object" errors in next piece of the code.

Oleksandr.Masovets’s picture

Status: Needs work » Needs review
StatusFileSize
new926 bytes

Try this one.

Status: Needs review » Needs work

The last submitted patch, search_api-1411712-25.patch, failed testing.

jsacksick’s picture

Sometimes this error occurs for me, and this seems to be because of the features module. Can you try to enter the filter settings of your view. And simply click apply (With no changes), and save.
When I do this, the 'group' of my filter is updated and it works again.

dynamicdan’s picture

Version: 7.x-1.0 » 7.x-1.1

I don't have features installed and I still get this message. I do however have a slightly complicated view (2 filters as 'AND').

I suspect that the view rendering the page is not sending an arg/param through. Perhaps the arg is optional in the view GUI?
Pasting view and hoping it's useful:

$view = new view;
$view->name = 'solr_search';
$view->description = 'Shows published search results';
$view->tag = 'default';
$view->base_table = 'search_api_index_solr_search_api_index';
$view->human_name = 'Core search';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Search results';
$handler->display->display_options['css_class'] = 'searchPage';
$handler->display->display_options['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
  2 => '2',
);
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '15';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['expose']['items_per_page'] = TRUE;
$handler->display->display_options['pager']['options']['expose']['items_per_page_options'] = '15, 25, 50, 100';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 1;
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['style_options']['row_class'] = 'searchResult';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['inline'] = array(
  'field_year' => 'field_year',
  'field_regions' => 'field_regions',
  'field_t_t' => 'field_t_t',
  'field_tags' => 'field_tags',
);
$handler->display->display_options['row_options']['separator'] = '|';
$handler->display->display_options['row_options']['hide_empty'] = 1;
$handler->display->display_options['row_options']['default_field_elements'] = 1;
/* Field: Indexed Content: Node ID */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['exclude'] = TRUE;
$handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['nid']['alter']['external'] = 0;
$handler->display->display_options['fields']['nid']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
$handler->display->display_options['fields']['nid']['alter']['html'] = 0;
$handler->display->display_options['fields']['nid']['element_label_colon'] = 1;
$handler->display->display_options['fields']['nid']['element_default_classes'] = 1;
$handler->display->display_options['fields']['nid']['hide_empty'] = 0;
$handler->display->display_options['fields']['nid']['empty_zero'] = 0;
$handler->display->display_options['fields']['nid']['link_to_entity'] = 0;
/* Field: Indexed Content: Content type */
$handler->display->display_options['fields']['type']['id'] = 'type';
$handler->display->display_options['fields']['type']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['type']['field'] = 'type';
$handler->display->display_options['fields']['type']['label'] = '';
$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']['absolute'] = 0;
$handler->display->display_options['fields']['type']['alter']['external'] = 0;
$handler->display->display_options['fields']['type']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['type']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['type']['alter']['nl2br'] = 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']['trim'] = 0;
$handler->display->display_options['fields']['type']['alter']['html'] = 0;
$handler->display->display_options['fields']['type']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['type']['element_default_classes'] = 1;
$handler->display->display_options['fields']['type']['hide_empty'] = 0;
$handler->display->display_options['fields']['type']['empty_zero'] = 0;
$handler->display->display_options['fields']['type']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['type']['link_to_entity'] = 0;
$handler->display->display_options['fields']['type']['format_name'] = 1;
/* Field: Indexed Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$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']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 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']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_type'] = 'h2';
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$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_entity'] = 1;
/* Field: The main body text: Summary (indexed) */
$handler->display->display_options['fields']['body_summary']['id'] = 'body_summary';
$handler->display->display_options['fields']['body_summary']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['body_summary']['field'] = 'body_summary';
$handler->display->display_options['fields']['body_summary']['label'] = '';
$handler->display->display_options['fields']['body_summary']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['external'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['body_summary']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['body_summary']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['trim'] = 0;
$handler->display->display_options['fields']['body_summary']['alter']['html'] = 0;
$handler->display->display_options['fields']['body_summary']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['body_summary']['element_default_classes'] = 1;
$handler->display->display_options['fields']['body_summary']['hide_empty'] = 0;
$handler->display->display_options['fields']['body_summary']['empty_zero'] = 0;
$handler->display->display_options['fields']['body_summary']['link_to_entity'] = 0;
/* Field: Indexed Content: Day */
$handler->display->display_options['fields']['field_day']['id'] = 'field_day';
$handler->display->display_options['fields']['field_day']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['field_day']['field'] = 'field_day';
$handler->display->display_options['fields']['field_day']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_day']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_day']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_day']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_day']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_day']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_day']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_day']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_day']['empty_zero'] = 0;
/* Field: Indexed Content: Month */
$handler->display->display_options['fields']['field_month']['id'] = 'field_month';
$handler->display->display_options['fields']['field_month']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['field_month']['field'] = 'field_month';
$handler->display->display_options['fields']['field_month']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_month']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_month']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_month']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_month']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_month']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_month']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_month']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_month']['empty_zero'] = 0;
/* Field: Indexed Content: Year */
$handler->display->display_options['fields']['field_year']['id'] = 'field_year';
$handler->display->display_options['fields']['field_year']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['field_year']['field'] = 'field_year';
$handler->display->display_options['fields']['field_year']['label'] = 'Date';
$handler->display->display_options['fields']['field_year']['alter']['alter_text'] = 1;
$handler->display->display_options['fields']['field_year']['alter']['text'] = '[field_day]/[field_month]/[field_year]';
$handler->display->display_options['fields']['field_year']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_year']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_year']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_year']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_year']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_year']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_year']['hide_empty'] = 1;
$handler->display->display_options['fields']['field_year']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_year']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_year']['settings'] = array(
  'thousand_separator' => '',
  'prefix_suffix' => 1,
);
$handler->display->display_options['fields']['field_year']['field_api_classes'] = 0;
/* Field: Indexed Content: Regions */
$handler->display->display_options['fields']['field_regions']['id'] = 'field_regions';
$handler->display->display_options['fields']['field_regions']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['field_regions']['field'] = 'field_regions';
$handler->display->display_options['fields']['field_regions']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_regions']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_regions']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_regions']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_regions']['element_class'] = 'term';
$handler->display->display_options['fields']['field_regions']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_regions']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_regions']['hide_empty'] = 1;
$handler->display->display_options['fields']['field_regions']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_regions']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_regions']['link_to_entity'] = 1;
$handler->display->display_options['fields']['field_regions']['view_mode'] = 'full';
/* Field: Indexed Content: Themes */
$handler->display->display_options['fields']['field_t_t']['id'] = 'field_t_t';
$handler->display->display_options['fields']['field_t_t']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['field_t_t']['field'] = 'field_t_t';
$handler->display->display_options['fields']['field_t_t']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_t_t']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_t_t']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_t_t']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_t_t']['element_class'] = 'term';
$handler->display->display_options['fields']['field_t_t']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_t_t']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_t_t']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_t_t']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_t_t']['link_to_entity'] = 1;
/* Field: Indexed Content: Tags */
$handler->display->display_options['fields']['field_tags']['id'] = 'field_tags';
$handler->display->display_options['fields']['field_tags']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['fields']['field_tags']['field'] = 'field_tags';
$handler->display->display_options['fields']['field_tags']['label'] = 'Keywords';
$handler->display->display_options['fields']['field_tags']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_tags']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_tags']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_tags']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_tags']['element_class'] = 'term';
$handler->display->display_options['fields']['field_tags']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_tags']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_tags']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_tags']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_tags']['link_to_entity'] = 1;
/* Contextual filter: Search: Fulltext search */
$handler->display->display_options['arguments']['search_api_views_fulltext']['id'] = 'search_api_views_fulltext';
$handler->display->display_options['arguments']['search_api_views_fulltext']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['arguments']['search_api_views_fulltext']['field'] = 'search_api_views_fulltext';
$handler->display->display_options['arguments']['search_api_views_fulltext']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['search_api_views_fulltext']['summary']['format'] = 'default_summary';
/* Filter criterion: Indexed Content: Status */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = '0';
$handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['label'] = 'Published';
$handler->display->display_options['filters']['status']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
$handler->display->display_options['filters']['status']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['status']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['status']['expose']['multiple'] = FALSE;
/* Filter criterion: Search: Fulltext search */
$handler->display->display_options['filters']['search_api_views_fulltext']['id'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['filters']['search_api_views_fulltext']['field'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['group'] = '0';
$handler->display->display_options['filters']['search_api_views_fulltext']['exposed'] = TRUE;
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['operator_id'] = 'search_api_views_fulltext_op';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['label'] = '(all content) Search';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['operator'] = 'search_api_views_fulltext_op';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['identifier'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['fields'] = array(
  'search_api_viewed' => 'search_api_viewed',
);

/* Display: SERP */
$handler = $view->new_display('page', 'SERP', 'page');
$handler->display->display_options['display_description'] = 'Shows published results for ALL users';
$handler->display->display_options['defaults']['access'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '15';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options'] = '10, 25, 50, 100';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['exposed_block'] = TRUE;
$handler->display->display_options['filter_groups']['groups'] = array(
  1 => 'AND',
  2 => 'AND',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Indexed Content: Status */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['label'] = 'Published';
$handler->display->display_options['filters']['status']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
$handler->display->display_options['filters']['status']['expose']['required'] = FALSE;
$handler->display->display_options['filters']['status']['expose']['remember'] = FALSE;
$handler->display->display_options['filters']['status']['expose']['multiple'] = FALSE;
/* Filter criterion: Search: Fulltext search */
$handler->display->display_options['filters']['search_api_views_fulltext']['id'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['filters']['search_api_views_fulltext']['field'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['group'] = 1;
$handler->display->display_options['filters']['search_api_views_fulltext']['exposed'] = TRUE;
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['operator_id'] = 'search_api_views_fulltext_op';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['label'] = 'Search the Portal';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['operator'] = 'search_api_views_fulltext_op';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['identifier'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['fields'] = array(
  'search_api_viewed' => 'search_api_viewed',
);
$handler->display->display_options['path'] = 'search';

/* Display: Full content SERP */
$handler = $view->new_display('page', 'Full content SERP', 'page_1');
$handler->display->display_options['display_description'] = 'Shows non-p. & published results for LOGGED IN users.';
$handler->display->display_options['filter_groups']['groups'] = array(
  1 => 'AND',
  2 => 'AND',
);
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Indexed Content: Status */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['operator'] = '<>';
$handler->display->display_options['filters']['status']['value'] = array();
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['exposed'] = TRUE;
$handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['label'] = 'Published';
$handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
$handler->display->display_options['filters']['status']['expose']['reduce'] = 0;
/* Filter criterion: Search: Fulltext search */
$handler->display->display_options['filters']['search_api_views_fulltext']['id'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['table'] = 'search_api_index_solr_search_api_index';
$handler->display->display_options['filters']['search_api_views_fulltext']['field'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['group'] = 1;
$handler->display->display_options['filters']['search_api_views_fulltext']['exposed'] = TRUE;
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['operator_id'] = 'search_api_views_fulltext_op';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['label'] = '(all content) Search';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['operator'] = 'search_api_views_fulltext_op';
$handler->display->display_options['filters']['search_api_views_fulltext']['expose']['identifier'] = 'search_api_views_fulltext';
$handler->display->display_options['filters']['search_api_views_fulltext']['fields'] = array(
  'search_api_viewed' => 'search_api_viewed',
);
$handler->display->display_options['path'] = 'all/content/search';

drunken monkey’s picture

Please, everyone, verify whether re-saving the view (as Jonathan suggests in #27) works.

FredericoT’s picture

In my specific case it could not be related to features since I do not have the module installed. Re-saving the view does not seem to make a difference either.

drunken monkey’s picture

And you're using the latest versions of both modules (Views and Search API)?

FredericoT’s picture

I am currently using the latest versions of both modules.
My earlier patch no longer works in the latest versions, though the problem does seem to remain the same. The variable $group['type'] doesn't always exist in my case.

dynamicdan’s picture

Title: Notice: Undefined index: type en SearchApiViewsQuery->build() » Notice: Undefined index: type in SearchApiViewsQuery->build()

Bug is still there.

I did however notice a corrupted search index. I cleared the index and then re-indexed all content. This process was somewhat buggy. I had to do it twice.
Haven't seen error since but I suspect it will re-appear.

tinkalink’s picture

Version: 7.x-1.1 » 7.x-1.3

Same for me, no features module installed

modstore’s picture

I get this warning as well, with the latest versions of views/search_api.

Tried saving the views again, but no luck.

tinkalink’s picture

Maybe this might help someone:
I had a filter on field Indexed Node: Status to just have published nodes displayed. I removed the filter and saved the view. Problem resolved, and found it's still working after adding the filter on published nodes again!

Adysone’s picture

#36 worked for me

brad.bulger’s picture

Version: 7.x-1.3 » 7.x-1.7

also getting this error in 7.x-1.7. the "type" value it wanted looks like it should be "AND" or "OR". just opening up the "And/Or, Rearrange" form on the filters and hitting Save fixed it.

drunken monkey’s picture

Status: Needs work » Needs review
StatusFileSize
new769 bytes

OK, if this still appears, let's just apply the workaround/check. Patch attached, please see if it gets rid of the notice.
Still think there's some Views bug involved, too, but with the Views documentation being what it is, it's of course impossible to tell.

brad.bulger’s picture

i can confirm that this patch stopped the error that i was getting, in a view with a similar problem to #38. thanks!

drunken monkey’s picture

Status: Needs review » Fixed

Excellent, good to hear. Thanks for testing!
Committed.

Status: Fixed » Closed (fixed)

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