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

Find record by non primary-key #11

Open
oduvan opened this issue May 5, 2010 · 0 comments
Open

Find record by non primary-key #11

oduvan opened this issue May 5, 2010 · 0 comments

Comments

@oduvan
Copy link

oduvan commented May 5, 2010

I'm create model, which have CharField as PrimaryKey.

And on final stage of project I try to add SpinxSearch by this model. And Sphinx doesn't support non integer document id.

So, I add IntegerField to this model, and try to use it as document id.

After my changes in conf-file of sphinx I get

Painter.search.query('bern') - return 1
len(list(Painter.search.query('bern'))) - return 0

It's happen, because django-sphinx always use primary key for document id.

If I'm right, I can try to make patch, I which you can use parameter in SphinxSearch, for example document_id_field, which by default will be 'pk', but user can use any field.

What do you think about it?

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