Comments (4)
Thanks for reporting! I'll fix it this weekend.
from searchkick.
Looks like the fix is more involved than I thought karmi/retire#178
Here's one way to do it:
class Dog < Animal
end
Animal.reindex # creates an index animals_development
Dog.reindex # creates an index dogs_development
Animal.search # searches animals_development
Dog.search # searches dogs_development
dog = Dog.first
dog.save # saves changes in both indexes if both exist
Another possibly simpler way would be:
Animal.reindex # creates an index animals_development
Dog.reindex # creates an index animals_development
Animal.search # searches animals_development
Dog.search # searches animals_development for _type dog
dog = Dog.first
dog.save # saves changes in one index
I'll have to think more about this. Let me know your thoughts.
from searchkick.
Personally, I think the second solution would work fine. It feels like how I would expect it to work.
Jens Ljungblad
On Sunday 8 September 2013 at 17:37, Andrew Kane wrote:
Looks like the fix is more involved than I thought karmi/retire#178 (karmi/retire#178)
Here's one way to do it:
class Dog < Animal end Animal.reindex # creates an index animals_development Dog.reindex # creates an index dogs_development Animal.search # searches animals_development Dog.search # searches dogs_development dog = Dog.first dog.save # saves changes in both indexes if both existAnother possibly simpler way would be:
Animal.reindex # creates an index animals_development Dog.reindex # creates an index animals_development Animal.search # searches animals_development Dog.search # searches animals_development for _type dog dog = Dog.first dog.save # saves changes in one indexI'll have to think more about this. Let me know your thoughts.
—
Reply to this email directly or view it on GitHub (#30 (comment)).
from searchkick.
Yeah, the second solution made the most sense. Give it a shot!
from searchkick.
Related Issues (20)
- rails production env indexmissing issue HOT 1
- Ability to set body_options globally in the same way you can model_options
- Clarify use of ActiveRecord `where` in `search_import` HOT 1
- Unable to load dynamic synonyms with Elastic HOT 1
- Support for Dynamoid (DynamoDB) HOT 2
- Add Semantic Search support HOT 2
- Make it also possible to set track_total_hits to an integer HOT 1
- Share indexes across environments? HOT 1
- Add support search_pipeline for OpenSearch client HOT 1
- No Mapping Found Error HOT 1
- Request level options for update requests HOT 2
- Attempting a full reindex can intermittently return an 'index_not_found_exception' HOT 2
- complex queries HOT 2
- Document how to disable callbacks for system tests
- Anonymous class triggers `Only call searchkick once per model` HOT 1
- model.indexed? as method for checking if a particular row has been indexed already? HOT 2
- exists: false acts like exists: true HOT 1
- FloatDomainError when paginating past max_result_window HOT 1
- Full Reindexes don't always clean old indices. HOT 2
- Searching across multiple models produces an exception HOT 2
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 searchkick.