" -> Bitmap Index Scan on weighted_tsv_question_idx (cost=0.00..12.33 rows=10 width=0) (actual time=0.052..0.052 rows=3 loops=1)"
" Index Cond: (weighted_tsv @@ to_tsquery('Hur&ofta'::text))"
"Planning time: 0.205 ms"
"Execution time: 0.104 ms"
Why the query is using the Bitmap ? Not the Index scan ?
Gin indexes do not support non-bitmap index scans, only bitmap index scans.
Also to_tsquery is casting to ::text. Is this normal ?
Yes.
It is pointless to test performance against a table with 10 rows. If your table will soon have a few thousand rows, then either wait until it does, or create a test server and fabricate a few thousand rows worth of test data.