Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
DhirendraGrazitti CreditAttribution: DhirendraGrazitti commentedComment #2
Ratul Saha CreditAttribution: Ratul Saha commentedThis 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 usingkeywordTokenizerFactory
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.Comment #3
Ratul Saha CreditAttribution: Ratul Saha commentedComment #4
designguru CreditAttribution: designguru as a volunteer commentedHi 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
Comment #5
krrishnajee CreditAttribution: krrishnajee as a volunteer commentedHey 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.