[Cubicweb] accessing the full text index
sylvain.thenault at logilab.fr
Tue Apr 27 13:38:41 CEST 2010
On 27 avril 12:45, Nicolas Chauvat wrote:
> Continuing with my new habit of discussing things on the list rather
> than calling Sylvain or Adrien on the phone, in order for everyone on
> the list to be able to join the discussion, here is an question of
> I have an app that needs to compare entities based on different
> criteria including their description. I happen to have re-coded an
> information retrieval procedure by eliminating stop words, computing
> word frequency then relevance, etc... before I realized that tsearch
> was probably doing this better and faster.
> I know about the "has_text" RQL relation. Is there any easy way for me
> to access directly the tsearch index ?
> I had a look at server/sources/rql2sql.py and the fti_table/has_text
> methods, but that's not really simple (yet). I am not even sure
> bypassing RQL with _cw.sql() and accessing directly the fti table
> would be the best option.
> Comments ?
I don't think full text search backend internal won't be ever
Of course you can still execute bare SQL if you don't mind
hijacking server session from the web side (if your code should
run there, and if you're using a all-in-one configuration).
You'll then have to learn tsearch api, since I suppose you're using
postgres as backend.
Sylvain Thénault LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure: http://www.logilab.fr/services
CubicWeb, the semantic web framework: http://www.cubicweb.org
More information about the Cubicweb