Searching/Filtering by Text Field with breaklines

Hi,
I’m trying to filter by a Text field and I have set search_full_text to False. Searching/Filtering by a Text field not working good at all (#12328) · Issues · Tryton / Tryton · GitLab.
The problem that I have now is that when I search for a Text field that has break lines in it, for example:
ITEM 1: 1242W LIGHT BULB + PHOTO
OPERATING AT 12V (XVSB)
VERSATILE 0" ADJUSTABLE HOLDER
BLACK STYLE
And I search these two lines (1st and 2nd line) for example like these 2 ways:
Variants.Description: "ITEM 1: 1242W LIGHT BULB + PHOTO OPERATING AT 12V (XVSB) "

Variants.Description: “1242W + PHOTO AT 12V”
It doesn’t find the record. If search_full_text is True (default), it finds the record.
So there is some way to keep the search_full_text to False and not having any problems with text fields that have breaklines.
Thanks beforehand

For me it looks like you are using the wrong database design.
The text sounds more like attributes of the product on which you can search specifically.

This is because with Text you will never have exact search, it is always a little bit fuzzy and slow.
With Text you can have the “Full Text” search and also similarity but it is designed to works on human words.
If you go with the simple ILIKE operator than it must take into account the carriage return in the text. And this is the problem with unstructured data.

Okay, it makes sense, thanks!!

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.