Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7767307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:38:40+00:00 2026-06-01T15:38:40+00:00

I’m having trouble getting Indextank’s AutoComplete feature to work in my Rails application. I’m

  • 0

I’m having trouble getting Indextank’s AutoComplete feature to work in my Rails application. I’m using searchify to host my index and the Tanker gem to create my index (https://github.com/kidpollo/tanker). I have followed the guide here (http://www.searchify.com/documentation/tutorial-autocomplete) and here (https://github.com/flaptor/indextank-jquery/) to get it working but I get no results back. I have enabled the public API in the searchify dashboard.

I think the problem is to do with the way the Tanker gem indexes the data (It can index multiple models in one index). The same issue was reported here – https://github.com/kidpollo/tanker/issues/25 – but i’m confused with the resolution that was given. I’m not sure what is meant by :indexes => :text in this instance. Can anyone shed a bit more light on what I need to do?

This is my model where I index data. No other model indexes data yet

class Post < ActiveRecord::Base
  include Tanker

  # Relationships
  belongs_to :user
  has_many :comments

  tankit index do
    indexes :title
    indexes :description
    indexes :post_comments do
      comments.map {|comment| comment.description }
    end
  end

  # define the callbacks to update or delete the index upon saving and deleting records
  after_save :update_tank_indexes
  after_destroy :delete_tank_indexes
end

This is the code I’ve used to test autocomplete. I have also tried using the example from https://github.com/flaptor/indextank-jquery/

<script src='https://raw.github.com/flaptor/indextank-jquery/master/jquery.indextank.ize.js' type='text/javascript'></script>
<script src='https://raw.github.com/flaptor/indextank-jquery/master/jquery.indextank.autocomplete.js' type='text/javascript'></script>

<script type='text/javascript'> 
  var publicApiUrl = "myPublicURL";
  var indexName = "myIndexName";
</script> 

<script type='text/javascript'>
  $(document).ready(function(){
      // let the form be 'indextank-aware'
      $("#myform").indextank_Ize(publicApiUrl, indexName);
      // let the query box have autocomplete
      $("#query").indextank_Autocomplete();
  });
</script>

<%= form_tag 'posts/search', :method => :get, :id => 'myForm' do %>
  <%= text_field_tag :query, "", :id => 'query' %>
  <button type="submit">Search</button>
<% end %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:38:42+00:00Added an answer on June 1, 2026 at 3:38 pm

    Hey Chris here from Searchify. I’m too familiar with the Tanker gem yet. But Searchify/IndexTank by default searches in the document field called ‘text’, including for autocomplete suggestions. So try indexing your data (title, description, or post_comments, from your code snippet) in the ‘text’ field. If you still have problems, contact me via the website or our support email and I can look at your index to see how you (and tanker) are indexing things.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.