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

How to sort results? #51

Closed
oleksify opened this issue Sep 23, 2011 · 1 comment
Closed

How to sort results? #51

oleksify opened this issue Sep 23, 2011 · 1 comment

Comments

@oleksify
Copy link

Is there a way to sort results of search? I use indextank for e-commerce app for facet search & catalog list. I need to have the ability to sort by name in ASC & DESC orders, and sort by (price * product.currency.index). As results returned as paginated results I'm not able to sort them as array bevcause each page begins from the start. Paginate => false didn't work right now. Any ideas hot to accomplish this?

@kidpollo
Copy link
Owner

Search indexes work a little bit different form relational databases basically there are scoring functions for this.
Tanker does not provide a specific api for this because the way scoring functions and variables can vary a lot.
check out

http://indextank.com/documentation/function-definition

for more info.

About the pagination, as I addressed on the other thread it seems to be that IndexTank enforces a default of 10 so if you are willing to always return all results you should try setting a huge per page number but I would not recommend it.

There is an example on the tanker readme on how to use functions and variables for sorting Geospatial data.

Cheers

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

2 participants