CRAIG
CRAIG

Reputation: 1029

Do sphinx attributes have to perfectly match DB storage settings?

If I have a field in my table called sortingfield and it is stored as a BIGINT(20) unsigned.

Does it have to be called as an attribute in a way that exactly matches it's storage method?

Or can it just be called like this:

 sql_attr_uint = sortingfield

Or does it have to be

 sql_attr_bigint = sortingfield

Or does the field in the DB have to be changed to signed?

Currently I am trying to sort on the field and it is not sorting.

So, to sum up again, does the way you call the attribute have to exactly match

Upvotes: 0

Views: 37

Answers (1)

barryhunter
barryhunter

Reputation: 21091

No they dont have to exactly match. Everything gets transfered as strings anyway, so type conversion is going on.

You just need to beware of out of range numbers.

Upvotes: 1

Related Questions