Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
imhoze opened this issue Feb 8, 2021 · 0 comments
Open

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

imhoze opened this issue Feb 8, 2021 · 0 comments

Comments

@imhoze
Copy link

imhoze commented Feb 8, 2021

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant