Re: no Search results for 3 Char From String

"ellie timoney" <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
Hi Michael,

On Mon, 26 Aug 2024, at 9:59 PM, Michael Menge wrote:
> Is this a bug or intended behavior? Did i miss an config Option
>
> We are using squatter search engine with cyrus 3.4.9

I think this is intended behaviour.  Have a look at this from imap/squat.h:

https://github.com/cyrusimap/cyrus-imapd/blob/cyrus-imapd-3.4/imap/squat.h#L114-L120
/* Don't change this unless you're SURE you know what you're doing.
   Its only effect on the API is that searches for strings that are
   shorter than SQUAT_WORD_SIZE are not allowed.
   In SQUAT, a 'word' simply refers to a string of SQUAT_WORD_SIZE
   arbitrary bytes.
*/
#define SQUAT_WORD_SIZE 4

There isn't a config option, but if you really want 3 char searches to work, I suppose you could change that define, recompile/reinstall, and probably rebuild search indexes.  I have no idea what the ramifications of doing this would be, nor how the default value of 4 was chosen.  Looks like this define has always been 4 since squat db support was first added.  I guess indexes would probably get bigger, but who knows by how much.

Cheers,

ellie
------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T337ad2195fcb4ab7-Mddeb3ff1b39a3f3a05ceaad0
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.