Comments (8)
I just merged some changes from a pull request done by @adrnai which do some changes to the instatiation logic can you please test your code by using the code from master
gem 'tanker', :git => 'git://github.com/kidpollo/tanker.git'
from tanker.
It seems I am unable to reproduce this behavior. One good way to debug is looking fo this line
results = index.search(query, options)
In tanker.rb and throwing a debugger in there.
please reffer to this issue
from tanker.
Now, after getting the pagination to work i run into the same problem with pagination and scopes! Here is what i did:
# it's working without scopes
t = Tour.search_tank "spanien"
t.count
>> 9
t.count
>> 9
# but not with!
t = Tour.reduce_to_coming_scope.search_tank "spanien"
t.count
>> 2 # this is correct
t.total_entries
>> 9 # this is the wrong, there are only 2
so i think total_entries is not counting correct, any ideas?
from tanker.
Hey @marcusg
Using scopes on tanker is a strange feature I added from someone in the community because it leads to all sorts of confusion.
Named scopes in Rails are no more that filters. A search index does not filter the same way a RBMS filters so what you are getting is accurate. The total entries does match what index tanx matches but out of those 9 entries only 2 match your scope.
I would not like to remove that feature cause it might be useful for other people.
from tanker.
hey @kidpollo
okay, so there is no change or an update planned? Then I have to find a way to use like I want :) Thanks for your help man!
from tanker.
I would love to see your input in this issue actually :D
The only update for me would be to put a warning in the readme to be careful of using scopes and Index Tank at the same time.
If you can find some kind of logic that would make scopes affect the search query in a way that makes sense go for it :P
I would personaly use some kind of fuzzy pagination :P
from tanker.
Of course, I'll send a pull request when i found a way to implement this in tanker ;)
from tanker.
Sorry I disappeared after posting this. I went on a backpacking trip and had no access to work stuff! I will play with the latest and see if I can help later today.
from tanker.
Related Issues (20)
- How to sort results? HOT 1
- DEPRECATION WARNING: Yajl's JSON gem compatibility API is going to be removed in 2.0 HOT 1
- Can tanker drop records that can't be found? HOT 4
- can't search for words with special chars HOT 2
- Configuration HOT 1
- Facets
- cannot connect to index tank on other port besides 80
- AutoComplete
- rake tanker:functions is not finding defined fnctions HOT 1
- Feature request: access to `query_relevance_score` HOT 1
- Tanker::Utilities.clear_all_indexes throws an exception
- Search through several models HOT 1
- Model.tanker_reindex exception: Invalid document size. It shouldn't be bigger than 100KB. Got 103720 bytes HOT 1
- undefined method `conditions' (Rails 3.2.12, Tanker 1.1.6) HOT 3
- search_tank alters the options hash
- IndexTank::HttpCodeException: Incorrect api call HOT 1
- "indexable?" does not work HOT 1
- Facets?
- Model.tanker_reindex does not clear current index. Just updates?
- How do i define multiple values for category, and then search for it? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tanker.