I have this error message after the upgrade of apachesolr and the replacement of solrconfig.xml and schema.xml

Notice: Undefined property: stdClass::$facet_counts en apachesolr_autocomplete_suggest() (línea 308 de /home/empresa/public_html/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module).
Notice: Undefined property: stdClass::$spellcheck en apachesolr_autocomplete_suggest_additional_term() (línea 257 de /home/empresa/public_html/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module)

Comments

janusman’s picture

Right, there have been recent changes in ApacheSolr for D7; could you specify what version of ApacheSolr Search you're using?

egarias’s picture

Ok I just upgraded yesterday to 7.x-1.0-beta4

domagoj.barisic’s picture

Same here, after upgrade to 7.x-1.0-beta4 autocomplete stopped working

brz’s picture

Subscribe

askibinski’s picture

I'm using beta 7 of the apachesolr module and the latest dev of autocomplete. This combination is broken. Version 1.1 is also incompatible with beta 7.

I believe the $params api might have changed? This is from Solr_Base_Query.php:

  protected $single_value_params = array(
    'q' => TRUE,    // http://wiki.apache.org/solr/SearchHandler#q
    'q.op' => TRUE, // http://wiki.apache.org/solr/SearchHandler#q.op
    'q.alt' => TRUE, // http://wiki.apache.org/solr/SearchHandler#q
    'df' => TRUE,
    'qt' => TRUE,
    'defType' => TRUE,
    'timeAllowed' => TRUE,
    'omitHeader' => TRUE,
    'debugQuery' => TRUE,
    'start' => TRUE,
    'rows' => TRUE,
    'facet' => TRUE,
    'facet.prefix' => TRUE,
    'facet.limit' => TRUE,
    'facet.offset' => TRUE,
    'facet.mincount' => TRUE,
    'facet.missing' => TRUE,
    'facet.method' => TRUE,
    'facet.enum.cache.minDf' => TRUE,
    'facet.date.start' => TRUE,
    'facet.date.end' => TRUE,
    'facet.date.gap' => TRUE,
    'facet.date.hardend' => TRUE,
    'facet.date.other' => TRUE,
    'facet.date.include' => TRUE,
    'hl' => TRUE,
    'hl.snippets' => TRUE,
    'hl.fragsize' => TRUE,
    'hl.mergeContiguous' => TRUE,
    'hl.requireFieldMatch' => TRUE,
    'hl.maxAnalyzedChars' => TRUE,
    'hl.alternateField' => TRUE,
    'hl.maxAlternateFieldLength' => TRUE,
    'hl.formatter' => TRUE,
    'hl.simple.pre/hl.simple.post' => TRUE,
    'hl.fragmenter' => TRUE,
    'hl.fragListBuilder' => TRUE,
    'hl.fragmentsBuilder' => TRUE,
    'hl.useFastVectorHighlighter' => TRUE,
    'hl.usePhraseHighlighter' => TRUE,
    'hl.highlightMultiTerm' => TRUE,
    'hl.regex.slop' => TRUE,
    'hl.regex.pattern' => TRUE,
    'hl.regex.maxAnalyzedChars' => TRUE,
  );
drasgardian’s picture

StatusFileSize
new2.22 KB

I ran into the same problem. Attached is a patch to bring apachesolr_autocomplete into line with being compatible with apachesolr_7.x-1.0-beta8

drasgardian’s picture

StatusFileSize
new1.76 KB

sorry, this patch file should be a bit cleaner.

egarias’s picture

tested and works

drasgardian’s picture

Status: Active » Needs work

Looking back at this again today I think it still needs a bit of work. The first row of my autocomplete results is indicating that there's 146 instances of anything I type into the search box (there's 146 indexed nodes on my site).

egarias’s picture

You are right, same here, an the rest of matches shows 1 result and the link doesn't work. sorry for my optimism

janusman’s picture

Status: Needs work » Needs review
StatusFileSize
new3.96 KB

Patch for review. This patch also includes fix for #1203772: numFound - incorrect Number of Found results.

askibinski’s picture

Seems to works, even get "do you mean" suggestions.

Need some more testing probably though. And I'm not sure how it works with short strings.

For example:
1. When I type "tes" I get one suggestion for "Testmanagement".
2. When I add an additional '"t" thus making the string "test", I get suggestions for several "test [words]". (search string + space + suggestions)
3. When I click on one of these suggestions I get results without the string "test" it seems. (of course searching

I know it's a little difficult to explain...

janusman’s picture

Status: Needs review » Closed (fixed)

Committed!