I'm really not sure where to file this. If it needs to be moved to another module, please feel free. I'm using Solr as my backend, and I checked the box to "Return an excerpt for all results".
I've got a view that searches and shows the node together with an excerpt, but the excerpt only ever contains the word (or term) searched for. So, if I search for "test" this is an example of one of the excerpts:
"Excerpt: test … test … test …"
How do I get a more helpful (i.e. longer) excerpt?
I've got another index on the same server that searches comments instead of nodes, and that search view provides good long excerpts just like I'd expect. I can't figure out any difference between how I've set them up. Anybody have suggestions?
Thanks,
-Joseph
Comments
Comment #1
jtbayly commentedI finally found a solution to this problem. I had the tokenizer turned on in the workflow tab. Turning off the tokenizer fixes the problem, as well as making indexing the data faster. Maybe this will help somebody else in the future.
Comment #3
elBradford commentedI just experienced this problem and can confirm that turning off the tokenizer gives proper excerpts. I was only tokenizing the title field, so I am unsure as to why it was doing anything to the Search: Excerpt field. I'm marking this as a bug because it smells like a bug to me.
Comment #4
elBradford commentedSetting it to the search API version I am on.
Comment #5
ryan.ryan commentedI can confirm that this is happening to me as well.
Comment #6
drunken monkeyIs there any advantage in using the Tokenizer with the Solr backend? Generally, I recommend turning it off in this case. Not only does it not have any advantages and slows down things – as we see here, it also leads to some problems. (Phrase searches probably won't work, either.)
Comment #7
mediaformat commentedI removed Tokenizer, but am still experiencing these single word excerpts...
Comment #8
mediaformat commentedloading and excluding the node body field seems to have given me the longer excerpt!
Comment #9
drunken monkeyOK, good to hear. Thanks for sharing your solution!
Comment #11
dafederSame problem, disabling tokenizer fixed it for me. For those having trouble finding it, it's in the search index configuration, under the Filters tab, and then in the Processors fieldset.