Skip to content

ERROR: type mismatch in getTupleFloat() when using UserPearCF #21

Open
@imhoze

Description

@imhoze

Hi, everyone!
Thanks for such an interesting implementation as recdb.

I tried to play with different options and successfully applied item-item recommenders.
But, got this problem using UserPearCF and UserCosCF recommenders

I created a rating table

create table ratings
(
	record_id bigserial not null
		constraint ratings_users_pk
			primary key,
	user_id integer not null,
	story_id integer not null,
	rating integer not null
);

create unique index ratings_record_id_uindex
	on ratings (record_id);

create index ratings_story_id_index
	on ratings (story_id);

create index ratings_user_id_index
	on ratings (user_id);

Then, I created a recommender for this

CREATE RECOMMENDER UserRec ON ratings
USERS FROM user_id
ITEMS FROM story_id
EVENTS FROM rating
USING userpearcf;

Trying to execute a query similar to the example

SELECT R.story_id, R.rating
          FROM ratings R RECOMMEND R.story_id TO R.user_id ON R.rating USING UserPearCF
            WHERE R.user_id = 1000
            ORDER BY R.rating DESC

Got this error:

ERROR:  type mismatch in getTupleFloat()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions