I am using apache solr and Apache Solr Autocomplete module. I want to show full node title in suggestion box list. suppose that I have a title "Checking embedding". when I put in text box Checking then "Checking embedding" title should be shown. Right now it is showing only "Checking".

Please help.

Comments

DhirendraGrazitti’s picture

Title: I want search node title » Display full node title in suggestion box.
Issue summary: View changes
Ratul Saha’s picture

Category: Bug report » Support request
Priority: Critical » Normal

This is not of critical priority and is a support request.

Apachesolr_autocomplete does not support this out of the box. However, the callback can be modified in a separate module or otherwise.

A brief outline of how to do this:

1. Create a new solr field that copies the label field and filter using keywordTokenizerFactory so that the title does not get broken by whitespaces or otherwise. Do this in schema.xml.
2. modify the query parameter using $query->replaceParam.
3. If necessary, modify how the result will show in the $result output and the jquery.

Ratul Saha’s picture

Status: Active » Closed (works as designed)
designguru’s picture

Hi Ratul,

We tried following the instructions @ http://knackforge.com/blog/selvam/drupal-7-and-solr-autocompleting-full-... which seem similar to your suggestions but couldn't make it work - found some javascript error which didn't return any results.

Do you think you could help us develop your outline into a full step by step walkthrough or otherwise code the custom module we'd need? Let me know if you're interested in helping further - we can make this a paid gig.

Qasim

krrishnajee’s picture

Hey designguru,

I also tried the #4 tutorial, getting an AJAX HTTP error (500). And I found 4 error messages in my drupal error log:-

Notice: Undefined index: facet.prefix in apachesolr_autocomplete_suggest() (line 461 of /home/test/webroot/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module).

Warning: Invalid argument supplied for foreach() in apachesolr_autocomplete_suggest() (line 470 of /home/test/webroot/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module).

Notice: Trying to get property of non-object in apachesolr_autocomplete_suggest() (line 470 of /home/test/webroot/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module).

Notice: Undefined property: stdClass::$payslip in apachesolr_autocomplete_suggest() (line 469 of /home/test/webroot/sites/all/modules/apachesolr_autocomplete/apachesolr_autocomplete.module).

I guess this tutorial almost doing the job we looking for, unfortunately they no longer providing support or any response to the comments. Is anyone able to figure out a way to implement this cool functionality? Even if it is a licence version, I'm happy to buy. Please help us. thanks.