I'm using Ransack for search filtering in my app and I have a request from the client. They have the ability to search Account via Account_number. An account_number looks like this in our database 123456 but to the users the account number looks like this 123-456. So when they search for the account number and add the dash the account is not found.
Is there a way to ignore Dashes in the search? Like, If a user puts a dash in the search, can I configure ransack to ignore that character?
Related
Hashtags must link to a Twitter search with the hashtag as the query
Which url do I have to link to a hashtag?
For example # hoge
plan1.https://twitter.com/search?q=hoge
plan2.https://twitter.com/hashtag/hoge?src=hash
plan3.https://twitter.com/hashtag/hoge
Or any one of the above ok?
plan 2 and plan 3 work, but the way that Twitter's twitter-text library autolinks hashtags, would produce this (instead of your suggested plan 1):
https://twitter.com/search?q=%23hoge
Does Google Search Appliance support wildcard characters in the query string. If no, is there any way I can fetch all the result set through my query?
The GSA does not support wildcarding. An option can be toN-Gram the fields or content that you want wildcarded. This would be achieved in your feeder or pipeline.
If waiting and upgrading the gsa software to v 7.2,.coming mid December is an option you will have wild card search built in.
Otherwise you have to dig deeper. A possible option is a document filter. If you are interested in that option I might be able to help.
I have developed such a document filter.
GSA software 7.4 has wildcard search built in. From documentation:
Enabling Wildcard Search
Wildcard search is a feature that enables your users to search by entering a word pattern rather than the exact spelling of a term. The search appliance supports two wildcard operators:
*--Matches zero or more characters
?--Matches exactly 1 character
Using wildcards can simplify queries for long names, technical data, pharmaceutical information, or strings where the exact spelling varies or is unknown. A user can search for all words starting with a particular pattern, ending with a particular pattern, or having a particular substring pattern.
By default, wildcard indexing is disabled for your search appliance. You can enable or disable wildcard indexing by using the Index > Index Settings page. You can disable or enable wildcard search for one or more front ends by using the Filters tab of the Search > Search Features > Front Ends page.
One way to get all indexed items from a collection is to use a query that will match every indexed record, e.g., supposing you're indexing some set of URLs from subdomain.companyname.com, just query for "companyname", with the "&num=1000&filter=0" query string parameters.
I would like to allow user to search for other users by typing a few keywords in Search box (with ThinkingSphinx as back-end).
After the server returned the search results and display it on View, I want users to be able to click on a dropdown, check on checkboxes to narrow down the results without resubmmitting the query.
Is there a way to filter previous search results WITHOUT having to submit a new query with additional keywords/facets?
Thank you.
Nope, there's not - well, not reliably. You could filter search results manually, but Sphinx paginates results, so you're not generally dealing with the full set of initial matches, which means there could be valid filtered responses you won't see.
To keep things reliable, it's best to run the query against Sphinx again.
I'd like to find mentions of a hashtag from my friends on Twitter.
At the moment I'm doing:
https://api.twitter.com/1/friends/ids.json?cursor=-1&screen_name=(name)
This returns a list of ids. What I'm then looking at doing is searching for a hashtag mention within that list of ids. Something like:
http://search.twitter.com/search.json?q=#hashtag IN user_id=(1,2,3,4)
One possible (and undesirable) workaround would be to do batch processing of:
http://api.twitter.com/1/users/lookup.json?user_id=(1,2,3,4 ~ 100)
And then construct a query based on the screen names.
Thanks
hey i am using solr search in my mvc.net application. Now i am doing free search on it but i want this search on specific field.
i.e. - - - i have various field like name, age, email, interest, profile
as i enter some text in search(free search) field i want that it searched only email field on indexed xml. how can i achieve it using free search.
If you need to search documents by a specific field, you can use the "fieldName:value" query format. eg. name:Manish