IndexedSearchEngine Question

Good evening –

I’m really new to Rails and I was looking for a way to use
IndexedSearchEngine with a “get” call instead of the default “post”. I
have the script by itself on a page /myapp/app/view/search/rhtml and I
want to be able to bookmark the query string.

I can’t seem to find where in the code the call to form_tag is. This is
as likely as not a terribly stupid question but like I said I’m -really-
new. Any help would be greatly appreciated.

I’m not totally familiar with the Indexed Search Engine, but I’m not
certain there is a form field involved. It looks like the whole thing is
pulled off using Ajax by doing an observe_field on :search.

You should be able to use a URL like:

www.mysite.com/search/search?terms=whatever%20you%20want

Give it a try…

Hi Steve

Out of the box, IndexedSearchEngine doesn’t really have what you’re
looking for - although it is a good suggestion. :wink:

Here’s is an option for what you can do:

Construct your URI like this:
http://site.com/search/search?terms=Tim%20Smith and add a partial to
your application in /app/views/notes/_search_results.rhtml that looks
something like this:

All About Tim S. <%= stylesheet_link_tag 'scaffold' %> <%= engine_stylesheet "indexed_search_engine" %> <%= javascript_include_tag :defaults %> <%= render :partial => 'search/search_field' %>
<% @results.each do |result| %> <%= link_to result.title, result.uri, :class => 'result_link' %>
<%= search_highlight result.context, @terms %>

<% end %>

HTH,
Lance B.

On 17 Jul 2006 05:47:49 -0000, steve ross

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs