MacFJA / php-redisearch

PHP Client for RediSearch
MIT License
67 stars 9 forks source link

Summarize - how to switch off? #26

Closed Leeloo5E closed 2 years ago

Leeloo5E commented 2 years ago

How can I switch off the summarize option?

https://github.com/MacFJA/php-redisearch/blob/bad89b313559406957ba0d00a6cf27a9b32fc646/src/Redis/Command/Search.php#L69

see https://oss.redis.com/redisearch/Highlight/#summarization

"RediSearch can perform summarization using the SUMMARIZE keyword. If no additional arguments are passed, all returned fields are summarized using built-in defaults."

A workaround is actually setting summarization to a dummy field, e.g.

->setSummarize(['dummy'])

MacFJA commented 2 years ago

It's an error. The PR #27 will fix that.


With the PR #27, SUMMARIZE will be disabled until you call ->setSummarize(...)

MacFJA commented 2 years ago

@Leeloo5E Can you try with version dev-main#b0fcfe7766aeb4ef46dadddd564c0c33afd1c1c6 ?

If it's good for you I will make a new release

Leeloo5E commented 2 years ago

@MacFJA works good. Thank you very much :-)))

pierrexp9 commented 2 years ago

Hi @MacFJA, Can we expect this new release soon ? (I'm also a bit bothered by the forced Highlight and the forced Summarize)

MacFJA commented 2 years ago

I completely forgot !

I just push the new release the version 2.1.1