Re: no Search results for 3 Char From String

Michael Menge <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <20240829134529.Horde.edrs7F6Wr5ukZAxnkWH3Dit@webmail.uni-tuebingen.de>
Hi Ellie,

Quoting ellie timoney <[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.
>

thanks for finding this. But if the search string is less than the  
SQUAT_WORD_SIZE
i would expect a "BAD" reply e.g. "BAD search string too short" or  
"BAD arguments invalid"
not an "OK Completed"

===
a SEARCH FROM "udo"
* SEARCH
a OK Completed (0 msgs in 0.150 secs)
===

See https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4 and
     https://datatracker.ietf.org/doc/html/rfc9051#section-6.4.4

Kind regards

   Michael



--
--------------------------------------------------------------------------------
Michael Menge                          Tel.: (49) 7071 / 29-70316
Universität Tübingen                   Fax.: (49) 7071 / 29-5912
Zentrum für Datenverarbeitung          mail:  
[email protected]
Wächterstraße 76
72074 Tübingen


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T337ad2195fcb4ab7-M8daaa21c9d2f209901d0f69a
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
smime.p7s (application/pkcs7-signature, 6.5 KB) - not displayed
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.