Skip to Content
Menu

57.35

v 14.0 Third Party
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 361
Technical Name bloomup_fulltext_search
LicenseOPL-1
Websitehttp://bloomup.it
Versions 14.0 16.0 17.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 361
Technical Name bloomup_fulltext_search
LicenseOPL-1
Websitehttp://bloomup.it
Versions 14.0 16.0 17.0
Bloomup Logo

Fulltext Search

Enable postgres full text search in Odoo

This module enables the full text search in Odoo.

You can customize the search by adding or removing fields from a model without any code.
Just go to the model form, under Fulltext search tab and select the fields you want to search in.
If you want to search in the messages of a model, you can enable the "Search in Messages" option.
After that click on "CREATE TSVECTOR COLUMN" and wait for the process to finish.
Model configuration
Go to Fulltext Searcher App by clicking on the corresponding menu item.
Model configuration
Choose the model you want to search in and type the text you want to search.
The search is performed in the fields you selected in the model configuration and in the messages if you enabled the option.
Results are shown in a list, ordered by rank with the possibility to open the record with the button.
You may find the same ID multiple times because each row represents either the model record or a single mail.message record.
Model configuration
Fulltext search is performed using the PostgreSQL websearch_to_tsquery.
You can use the correct syntax explained in the PostgreSQL documentation.

PostgreSQL documentation

websearch_to_tsquery creates a tsquery value from querytext using an alternative syntax in which simple unformatted text is a valid query. Unlike plainto_tsquery and phraseto_tsquery, it also recognizes certain operators. Moreover, this function will never raise syntax errors, which makes it possible to use raw user-supplied input for search. The following syntax is supported:

  • unquoted text: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.

  • "quoted text": text inside quote marks will be converted to terms separated by <-> operators, as if processed by phraseto_tsquery.

  • OR: the word “or” will be converted to the | operator.

  • -: a dash will be converted to the ! operator.

Other punctuation is ignored. So like plainto_tsquery and phraseto_tsquery, the websearch_to_tsquery function will not recognize tsquery operators, weight labels, or prefix-match labels in its input.

Examples:

                SELECT websearch_to_tsquery('english', 'The fat rats');
                websearch_to_tsquery
                ----------------------
                'fat' & 'rat'
                (1 row)
                
                SELECT websearch_to_tsquery('english', '"supernovae stars" -crab');
                        websearch_to_tsquery
                ----------------------------------
                'supernova' <-> 'star' & !'crab'
                (1 row)
                
                SELECT websearch_to_tsquery('english', '"sad cat" or "fat rat"');
                        websearch_to_tsquery
                -----------------------------------
                'sad' <-> 'cat' | 'fat' <-> 'rat'
                (1 row)
                
                SELECT websearch_to_tsquery('english', 'signal -"segmentation fault"');
                        websearch_to_tsquery
                ---------------------------------------
                'signal' & !( 'segment' <-> 'fault' )
                (1 row)
                
                SELECT websearch_to_tsquery('english', '""" )( dummy \\ query <->');
                websearch_to_tsquery
                ----------------------
                'dummi' & 'queri'
                (1 row)
                    

Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.