xmlによる検索結果の出力
Fess の検索結果をxmlにより出力することができます。xmlにより出力するためには、管理画面のクロール全般の設定でxml応答を有効にしておく必要があります。
リクエスト
xmlにより出力結果を得るためには http://localhost:8080/fess/xml?query=検索語 のようなリクエストを送ります。リクエストパラメータについては以下の通りです。
| query | 検索語。URLエンコードして渡します。 | 
| start | 開始する件数位置。0から始まります。 | 
| num | 表示件数。デフォルトは20件です。100件まで表示できます。 | 
| labelTypeValue | ラベル値。ラベルを指定する場合に利用します。 | 
レスポンス
以下のようなレスポンスが返ります。
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <version>1</version>
  <status>0</status>
  <query>テスト</query>
  <exec-time>0.64</exec-time>
  <page-size>20</page-size>
  <page-number>1</page-number>
  <record-count>101</record-count>
  <page-count>6</page-count>
  <result>
    <doc>
      <site>speedtest.goo.ne.jp/</site>
      <content-description>goo の提供するスピード<em>テスト</em>ページです</content-description>
      <host>speedtest.goo.ne.jp</host>
      <last-modified>1284739487873</last-modified>
      <cache>龠-->
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<title>
goo スピード<em>テスト</em>
</title>
<meta...">
<meta name="description" content="goo の提供するスピード<em>テスト</em>ページです">
<meta name="keywords" content="ADSL,ブロードバンド,フレ...ッツ,BB,無線LAN,CATV,ISDN,スピード<em>テスト</em>">
<meta name="Copyright" content="Copyright &copy; (C)NTT-X Inc, All...://speedtest.goo.ne.jp/"><img src="/img/h1/h1_76.gif" width="129" height="22" border="0" alt="スピード<em>テスト</em>"><img src..." color="#ffffff">goo スピード<em>テスト</em></font></a></b></td>
<!--/NAME SERVICE-->
</tr>
</table>
</td>
</tr>
<tr>
<td</cache>
      <score>4.98744</score>
      <digest>goo の提供するスピード<em>テスト</em>ページです</digest>
      <tstamp>1284739487887</tstamp>
      <url>http://speedtest.goo.ne.jp/</url>
      <id>http://speedtest.goo.ne.jp/;type=au,docomo,pc,softbank</id>
      <mimetype>text/html</mimetype>
      <title>
goo スピードテスト
</title>
      <content-title>
goo スピードテスト
</content-title>
      <boost>1.0</boost>
      <content-length>17810</content-length>
      <url-link>http://speedtest.goo.ne.jp/</url-link>
    </doc>
...
  </result>
</response>
各要素については以下の通りです。
| response | ルート要素。 | 
| version | フォーマットバージョン。 | 
| status | レスポンスのステータス。正常応答は0。 | 
| query | 検索語。 | 
| exec-time | 応答時間。単位は秒。 | 
| page-size | 表示件数。 | 
| page-number | ページ番号。 | 
| record-count | 検索語に対してヒットした件数。 | 
| page-count | 検索語に対してヒットした件数のページ数。 | 
| result | 検索結果の親要素。 | 
| doc | 検索結果の要素。 | 
| site | サイト名。 | 
| content-description | コンテンツの説明。 | 
| host | ホスト名。 | 
| last-modified | 最終更新日時。1970/01/01 00:00:00 から始まるミリ秒。 | 
| cache | コンテンツの内容。 | 
| score | ドキュメントのスコア値。 | 
| digest | ドキュメントのダイジェスト文字列。 | 
| tstamp | ドキュメントの生成日時。1970/01/01 00:00:00 から始まるミリ秒。 | 
| url | ドキュメントのURL。 | 
| id | ドキュメントのID。 | 
| mimetype | MIMEタイプ。 | 
| title | ドキュメントのタイトル。 | 
| content-title | 表示用のドキュメントのタイトル。 | 
| content-length | ドキュメントのサイズ。 | 
| url-link | 検索結果としてのURL。 |