$ 57.35
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 361 |
Technical Name |
bloomup_fulltext_search |
License | OPL-1 |
Website | http://bloomup.it |
Versions | 14.0 16.0 17.0 |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 361 |
Technical Name |
bloomup_fulltext_search |
License | OPL-1 |
Website | http://bloomup.it |
Versions | 14.0 16.0 17.0 |

Fulltext Search
Enable postgres full text search in Odoo
This module enables the full text search in Odoo. Other punctuation is ignored. So like Examples:
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.
Go to Fulltext Searcher App by clicking on the corresponding menu item.
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.
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.plainto_tsquery
and phraseto_tsquery
, the websearch_to_tsquery
function will not recognize tsquery
operators, weight labels, or prefix-match labels in its input.
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