Google Custom Search Engine(カスタム検索エンジン)

http://sunflower.fine.to/WEB/archives/2008/02/08-000796.php を元に設定。

http://www.google.com/coop/cse/

1. [Create a Custom Search Engine]をクリックする。

2. ログイン画面が表示されるのでログインする。

3. [Set up your search engine]に関しての設定を行う。

[Basic Information]に入力する。
[What do you want to search?]にて[Only sites I select]を選択(デフォルト)。
[Select some sites]にて該当URLを入力。複数のURLの場合は改行して複数入力可能。
[Select an edition]はデフォルトのまま([Standard Edition]のまま)
[I have read and agree to the Terms of Service.]をチェックして[Next}をクリック。

4. [Try it out]に関して。

[Preview]には検索ボックスのプレビューが表示される。
[Congratulations!]には何ができるかが記載されている。

Click "Finish" to go to your "My search engines" page, where you can access your search engine from its new homepage on Google or use its control panel to further customize it in the following ways:

  • Include more sites
  • Change the look and feel
  • Sign up to make money
  • Invite people to contribute
  • Create search refinements
[Send confirmation email to メールアドレス]にはチェックされているのでそのまま[Finish]をクリック。

4. [My search engines]ページの[control panel]の[Code]をクリック。

[Search results hosting options]で[On a Google-hosted page]を選択。

そのほかにiframe方式とjavascriptによるmodal overlay(表示ページの上に重ねて表示)がある。

[Search box code]に表示されたコードを貼り付ける。script中の"&"は"&"に変える。

5. [My search engines]ページの[control panel]の[Basics]をクリック。

貼り付けるページがShift_JISの場合、[Search engine encoding]を[Japanese(Shift_JIS)]に変更。

ちなみに、貼り付けフォーム中に以下の指定をしてもいいらしい。

<input type="hidden" name="ie" value="Shift_JIS" />
<input type="hidden" name="oe" value="Shift_JIS" />