Comments (4)
Maybe it would be better to have the ability to define a dictionary for this? I think this may be useful for us as well.
from searchkick.
Hey Craig, I think the best way to do this is add a separate field for the abbreviated company name.
class Company
def search_data
{
name: name,
abbreviated_name: name.split(/\s+/).map{|w| w[0] }.join("")
}
end
end
And query with:
Company.search "Some Company Name", fields: [:name, :abbreviated_name]
Company.search "SCN", fields: [:name, :abbreviated_name]
from searchkick.
I would happily attempt to create the ability for this. Ill give it a go and see if i can do anything.
Sent from my Windows Phone
From: Mehul Karmailto:[email protected]
Sent: 01/08/2013 18:31
To: ankane/searchkickmailto:[email protected]
Cc: Craig Sheenmailto:[email protected]
Subject: Re: [searchkick] Working with abbreviations (#3)
Maybe it would be better to have the ability to define a dictionary for this? I think this may be useful for us as well.
Reply to this email directly or view it on GitHub:
#3 (comment)
from searchkick.
Hmm yeah I think the above would be the best way as it just uses what is there. I do think it would be a cool idea in the future to implement this but I will close this.
Thanks for the above.
from searchkick.
Related Issues (20)
- While using opensearch-ruby got error: end of file reached (Faraday::ConnectionFailed) HOT 1
- Default index name doesn't use UTC time HOT 1
- minor issue when when doing a full reindex in queue mode HOT 1
- Make "Searchkick.search" for multi-model searches work with Rails low-level caching HOT 4
- Why is `_script` filters commented out in the source code? Possible to add support for scripts? HOT 2
- Index different objects to different indices HOT 2
- Integrate partial reindexing with mode_async bulk reindexing
- `scope_results` outputs incorrect warnings HOT 1
- 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
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.