autocomplete return HTTP Status 400 - Too many values for UnInvertedField faceting on field spell

HTTP Status: 400;
Message: Bad Request: Bad Request;
Response:

<html><head><title>Apache Tomcat/6.0.39 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 400 - Too many values for UnInvertedField faceting on field spell</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Too many values for UnInvertedField faceting on field spell</u></p><p><b>description</b> <u>The request sent by the client was syntactically incorrect.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.39</h3></body></html>

Request: GET /solr/select?start=0&rows=0&fq=ss_language%3Aar&spellcheck.q=&spellcheck=true&apachesolr_search_sort=&facet=true&facet.field=spell&facet.limit=25&facet.mincount=1&facet.prefix=man&bq=bundle%3Aarticle%5E0.3&bq=bundle%3Aauthor%5E0.5&bq=bundle%3Abook%5E13.0&bq=bundle%3Apublishing_houses%5E0.3&qf=content%5E12&qf=label%5E0.1&qf=tm_vid_6_names%5E4&qf=tos_name%5E0.5&qf=tos_name_formatted%5E0.5&qf=ts_comments%5E4&fl=teaser&hl.fl=i18n_content_ar%2Ci18n_ts_ar_comments&f.i18n_content_ar.hl.alternateField=i18n_teaser_ar&wt=json&json.nl=map HTTP/1.0 User-Agent: Drupal (+http://drupal.org/) Connection: close Host: 172.30.0.151:8080 ;
Caller: apachesolr_autocomplete_suggest() (line 485 of /var/www/html/ektab.com/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module)

Solution: as described here http://lists.typo3.org/pipermail/typo3-project-solr/2011-September/00059...
need to change/add facet.method=enum

Comments

pnagornyak created an issue. See original summary.

pnagornyak’s picture

Issue summary: View changes

temporary solution

function MYMODULE_apachesolr_query_alter(&$query) {
  $param = 'facet.method';
  $facet_method = $query->getParam($param);
  if (empty($facet_method)) {
    $query->addParam($param, 'enum');
  }
}