Search Postgresql Archives

Re: Full text search with plain input

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

 



Based on the docs, plainto_tsquery() creates tsquery with the & operator (https://www.postgresql.org/docs/10/static/functions-textsearch.html), so the @@ operator will not find partial matches. And this way I cannot calculate ts_rank for those partial matches.
Now I am thinking about splitting the input text myself to terms, then searching and ranking  the documents for each term. Finally summing the scores by document. This way the documents with more matching terms would get greater score.
Please anybody let me know if there is some better/easier solution for this.

Thanks,
Otto


2018-05-05 2:06 GMT+02:00 David G. Johnston <david.g.johnston@xxxxxxxxx>:
On Friday, May 4, 2018, Havasvölgyi Ottó <havasvolgyi.otto@xxxxxxxxx> wrote:
 so that it matches (with less rank) even if one of its words match ?

That seems to be what "ts_rank" provides.

David J.
 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux