0

I encounter a strange behavior on a site I'm working on.

I use Search API views exposed form for autocomplete. My nodes reference nodes of another content type. The title of this referenced node's should be returned by autocomplete. This works all fine until more than 22 nodes are indexed. It seems like it does not matter which nodes are indexed, when 22 are exceeded the autocomplete will not return any results anymore.

I also tried to index the field as different types but the outcome is the same.

If i type in the term and click search the results are fine. I also ran the query in Solr's backend which returns the result as well.

Log's of Drupal and Solr show nothing.

Any suggestion on what and how to debug this?

0

RTFM - Today i finally found this: https://www.drupal.org/node/1999392#hidden-variables

search_api_solr_autocomplete_max_occurrences By default, keywords that occur in more than 90% of results are ignored for autocomplete suggestions. This setting lets you modify that behaviour by providing your own ratio. Use 1 or greater to use all suggestions. Defaults to 0.9.

This makes perfect sense since 90% of my total 25 nodes is 22.5. I just set in a custom module:

variable_set('search_api_solr_autocomplete_max_occurrences', 0);

And it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.