Closed (fixed)
Project:
Search API Solr
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2011 at 14:18 UTC
Updated:
31 May 2013 at 13:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drunken monkeyThe attached patch should do this.
Comment #2
drunken monkeyCommitted.
Comment #4
118218 commentedThe highlight feature does not work for me.
I did dozens of tests, but the only excerpt I was able to generate was: "Test ... Test ...".
The real content of this node is "Test Testé ok salut Proin semper bibendum triplet. Nulla facilisi."
Apart from this, I'm not able to get any other excerpt. Why?
It's very strange because this feature works very well with "Apache Solr Search Integration". But this module is not as flexible as yours, with views...
Please I need this wonderful feature!
Comment #5
jtse commentedBump. Experiencing same issue as #4.
UPDATE #1:
The excerpt appears fine if the matched terms are in the title. If the terms are in the body, however, all I see is "[TERM]...[TERM]..." as with #4
UPDATE #2:It looks like it does not return the proper highlighted excerpt for text fields with summary. It works fine for text fields without summary. Investigating cause...
UPDATE #3:
Ignore UPDATE #2. The issue specific to the body field. If I create another field like the body (e.g., field_body2), the excerpt behaves as expected.
Comment #6
presleyd commentedI see the same issue as 5. Other text fields seem to return a usable excerpt but the default 'body' field just returns "[TERM]...[TERM]..."
Update... well after adding another field now even the body excerpts show up fine. That's a weird one.
Comment #7
that0n3guy commentedI'm going to mark this as "needs work" if thats ok. I am running solr 3.5 and getting similar results to the above individuals (with the test... test.. thing).
Here are some images to show what we are talking about. I get the same result whether I'm using views excerpt field or just search api pages module (which is shown in the images).
This is with "Return an excerpt for all results" unchecked:
No Excerpt setting
This is with "Return an excerpt for all results" checked
Excerpt Setting
Whether I have "Retrieve result data from Solr" or "Highlight retrieved data" checked doesn't seem to matter.
Also, it doesn't say "text" every time. It says whatever I search. So if I search "simple". I get "simple...".
Comment #8
jtbayly commentedI had this problem too, but I was able to fix it by disabling the tokenizer processor in the workflow tab of the Search API index settings.
See this issue: http://drupal.org/node/1588612
Comment #9
drunken monkeyYes, please deactivate all processors (or at least the default ones) when using a Solr server!
Please report back if you're still experiencing difficulties.
Comment #10
gmclelland commentedMy search excerpts highlighting is working, but is it normal that they show html tags in the search excerpts? Can those be stripped out somehow?
Comment #11
Anonymous (not verified) commentedA lot of people will tell you to disable all Processors in the Workflow settings. However, if you wish to do nothing with the HTML tags, you can enable the HTML filter.
Comment #12
colanNo more unsolved problems after #9. See #1064520: Add a processor for highlighting for Views integration.
Marking #1581638: Highlighting searched keyword as a duplicate.
Comment #13
drunken monkeyNow that you mention it, I can see how this might actually be very useful. And for years I've preached the opposite, without really thinking about it … Oops.
Thanks for opening my eyes in this respect. Attached is a patch which would clarify this in the README.txt file. Anywhere else it should be changed? (The service class description is already verbose enough, I think, and also doesn't state this as absolutely as the README.txt.)
Comment #14
drunken monkeyCommitted.