Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Due to some bad logic I was clobbering the spellchecker suggestions. This patch fixes it.
Comment | File | Size | Author |
---|---|---|---|
#6 | apachesolr_autocomplete.module.rej_.txt | 4.28 KB | rhymeswithcamera |
#3 | apachesolr_autocomplete-spellchecker-814166-3.patch | 6.24 KB | tsphethean |
#1 | apachesolr_autocomplete-spellchecker-2.patch | 1.81 KB | janusman |
apachesolr_autocomplete-spellchecker.patch | 1.71 KB | janusman |
Comments
Comment #1
janusman CreditAttribution: janusman commentedCommitting this patch.
Comment #3
tsphethean CreditAttribution: tsphethean commentedRelated to my patch submission for the Apache Solr Search Integration module (http://drupal.org/node/875716) I have attached a revised patch for this which resolves issues in the autocomplete module when the user configures Solr to take advantage of different parameters with the spelling suggestions component.
The main change in this version of the patch is that when:
true
then SOLR passes back a more complex object than the array that was being handled. Extended results means that the frequency of the spelling suggestions occurring in the index can be displayed to the end user.
Other changes are to handle:
true
Collation looks at the phrases for which spelling suggestions are being provided, and puts together the most likely group of phrases based rather than a single phrase. For example, if I were to search for "Druapl slro", with collate = false I would be given suggestions of "Drupal" and "solr" as individual phrases. With collate = true, solr will return "Drupal solr" as a collated term.
Let me know if any further changes or information are needed.
Comment #4
dani.latorre CreditAttribution: dani.latorre commentedWith which revision does the patch 3 work? I tried last revision. I also tried to apply the patch 2 before the patch 3.
Thank you a lot.
Comment #5
janusman CreditAttribution: janusman commentedPatch from #2 is already applied in the current DEV version. My guess is that @tsphethean made the patch so it would apply to that. (e.g. download or checkout the current DEV version, then apply patch from #3).
BTW I still haven't seen #3. Reviews welcome. =)
Comment #6
rhymeswithcamera CreditAttribution: rhymeswithcamera commentedI am on 6.x-1.x-dev and Apache Solr 6.x-2.x-dev. I couldn't get the patch to work: 2 of the 6 hunks failed. I've attached the .rej file.
The search field behaves the same regardless of whether I have the spellchecker enabled or not. No suggestions are ever displayed, even though the spinner object spins. Pressing Return doesn't execute the search; instead, I have to click the Search button twice to get the query to execute.
This is a great module, and I would really like to use this feature on our site since search is a key function. Is there something else I should be doing/checking to make this feature work?
Thanks for your help.
Comment #7
janusman CreditAttribution: janusman commented@rhymeswithcamera: are you talking about the patch from comment #3?
Comment #8
janusman CreditAttribution: janusman commentedI took a look at the patch in #3 and it doesn't apply to DEV anymore. Also, I made some commits today that would also require more changes.
@tsphethean: I like the idea very much and will definitely include it when I get a clean patch. Also, could you specify what changes you made to schema.xml or solrconfig.xml to get collated spelling suggestions? It looks like it would be a good recommendation to give other implementers (and maybe even work it into the default configuration over at apachesolr.module).
Comment #9
rhymeswithcamera CreditAttribution: rhymeswithcamera commentedSorry about that @janusman. Yes, I applied the patch in #3. Thank you for looking into this!
Comment #10
janusman CreditAttribution: janusman commentedBetter title
Comment #11
janusman CreditAttribution: janusman commentedAlso, not a bug but a feature request =)
Patch probably won't apply to current dev branches anymore...
Comment #12
bzbzh CreditAttribution: bzbzh commentedsubscribe