0

I'm using texticle to search through the name and description attributes of a product model.

So far, texticle seems to rank the query found in the description higher than the query found in the name. I would like to do the reverse of this.

In other words, matches in the name column should be more heavily weighted than the matches in the description column.

Is it possible to this?

digitalWestie
  • 2,647
  • 6
  • 28
  • 45
  • Does your gem allow you to set different weights for different sources? At the PostgreSQL level you probably want to create separate tsvector objects, assign different weights to them, and concatenate them. http://www.postgresql.org/docs/9.1/interactive/textsearch-controls.html – kgrittn Apr 23 '12 at 12:07
  • As far as I can tell, no. I could go to the PostgreSQL level but I'd rather use the gem as I'm not too familiar with PostgreSQL – digitalWestie Apr 23 '12 at 13:57
  • It looks like you need to enhance the gem, ask the authors to do so, or find a different gem. – kgrittn Apr 23 '12 at 15:30

1 Answers1

2

While texticle works pretty well out of the box, it is a fairly simple implementation and does not expose all of postgresql's full text search functionality.

pg_search exposes a lot more of postgresql's full text search functionality, and also seems more actively maintained than texticle.

Lev
  • 1,161
  • 11
  • 23