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

jtbayly’s picture

Status: Active » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

elBradford’s picture

Category: support » bug
Status: Closed (fixed) » Active

I 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.

elBradford’s picture

Version: 7.x-1.0-rc1 » 7.x-1.2

Setting it to the search API version I am on.

ryan.ryan’s picture

I can confirm that this is happening to me as well.

drunken monkey’s picture

Is 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.)

mediaformat’s picture

Version: 7.x-1.2 » 7.x-1.13
Issue summary: View changes

I removed Tokenizer, but am still experiencing these single word excerpts...

mediaformat’s picture

loading and excluding the node body field seems to have given me the longer excerpt!

drunken monkey’s picture

Category: Bug report » Support request
Status: Active » Fixed

OK, good to hear. Thanks for sharing your solution!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

dafeder’s picture

Same 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.