Re: no Search results for 3 Char From String

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ellie,

Quoting ellie timoney <ellie@xxxxxxxxxxxx>:

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: michael.menge@xxxxxxxxxxxxxxxxxxxx
Wächterstraße 76
72074 Tübingen

Attachment: smime.p7s
Description: S/MIME-Signatur


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T337ad2195fcb4ab7-M8daaa21c9d2f209901d0f69a
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]
  Powered by Linux