# IndexedSearchEngine Question

**URL:** <https://www.ruby-forum.com/t/indexedsearchengine-question/98624>\
**Category:** Engines\
**Created:** [July 17, 2006, 2:07am UTC](https://www.ruby-forum.com/t/indexedsearchengine-question/98624 "2006-07-17T02:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [July 17, 2006, 2:07am UTC](https://www.ruby-forum.com/t/indexedsearchengine-question/98624/1 "2006-07-17T02:07:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [July 17, 2006, 7:46am UTC](https://www.ruby-forum.com/t/indexedsearchengine-question/98624/2 "2006-07-17T07:46:42Z")

</div>

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](http://www.mysite.com/search/search?terms=whatever%20you%20want)

Give it a try…

---

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [July 18, 2006, 3:47am UTC](https://www.ruby-forum.com/t/indexedsearchengine-question/98624/3 "2006-07-18T03:47:54Z")

</div>

Hi Steve

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

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

Construct your URI like this:  
[http://site.com/search/search?terms=Tim%20Smith](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
