| 1 |
|
| 2 |
<!DOCTYPE html> |
| 3 |
|
| 4 |
|
| 5 |
<html lang="ja" data-content_root="../../" > |
| 6 |
|
| 7 |
<head> |
| 8 |
<meta charset="utf-8" /> |
| 9 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 10 |
|
| 11 |
<title>5.2.1. 比較 — Groonga v16.0.9ドキュメント</title> |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
<script data-cfasync="false"> |
| 16 |
document.documentElement.dataset.mode = localStorage.getItem("mode") || ""; |
| 17 |
document.documentElement.dataset.theme = localStorage.getItem("theme") || ""; |
| 18 |
</script> |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
<noscript> |
| 23 |
<style> |
| 24 |
.pst-js-only { display: none !important; } |
| 25 |
|
| 26 |
</style> |
| 27 |
</noscript> |
| 28 |
|
| 29 |
|
| 30 |
<link href="../../_static/styles/theme.css?digest=90905a2f556bf617f1a9" rel="stylesheet" /> |
| 31 |
<link href="../../_static/styles/pydata-sphinx-theme.css?digest=90905a2f556bf617f1a9" rel="stylesheet" /> |
| 32 |
|
| 33 |
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=8f2a1f02" /> |
| 34 |
|
| 35 |
|
| 36 |
<script defer src="../../_static/scripts/fontawesome.js?digest=90905a2f556bf617f1a9"></script> |
| 37 |
|
| 38 |
<link rel="preload" as="script" href="../../_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9" /> |
| 39 |
<link rel="preload" as="script" href="../../_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9" /> |
| 40 |
|
| 41 |
<script src="../../_static/documentation_options.js?v=1e3c191b"></script> |
| 42 |
<script src="../../_static/doctools.js?v=fd6eb6e6"></script> |
| 43 |
<script src="../../_static/sphinx_highlight.js?v=6ffebe34"></script> |
| 44 |
<script src="../../_static/translations.js?v=4755f45a"></script> |
| 45 |
<script> |
| 46 |
window.dataLayer = window.dataLayer || []; |
| 47 |
function gtag(){ dataLayer.push(arguments); } |
| 48 |
gtag('consent', 'default', { |
| 49 |
'ad_storage': 'denied', |
| 50 |
'ad_user_data': 'denied', |
| 51 |
'ad_personalization': 'denied', |
| 52 |
'analytics_storage': 'denied' |
| 53 |
}); |
| 54 |
</script> |
| 55 |
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=G-MDK38RHNPW"></script> |
| 56 |
<script> |
| 57 |
window.dataLayer = window.dataLayer || []; |
| 58 |
function gtag(){dataLayer.push(arguments);} |
| 59 |
gtag('js', new Date()); |
| 60 |
gtag('config', 'G-MDK38RHNPW'); |
| 61 |
</script> |
| 62 |
<script>DOCUMENTATION_OPTIONS.pagename = 'server/http/comparison';</script> |
| 63 |
<script> |
| 64 |
DOCUMENTATION_OPTIONS.theme_version = '0.20.0'; |
| 65 |
DOCUMENTATION_OPTIONS.theme_switcher_json_url = 'https://groonga.org/docs/_static/switcher.json'; |
| 66 |
DOCUMENTATION_OPTIONS.theme_switcher_version_match = 'japanese'; |
| 67 |
DOCUMENTATION_OPTIONS.show_version_warning_banner = |
| 68 |
false; |
| 69 |
</script> |
| 70 |
<script>DOCUMENTATION_OPTIONS.search_as_you_type = false;</script> |
| 71 |
<link rel="icon" href="../../_static/favicon.ico"/> |
| 72 |
<link rel="index" title="索引" href="../../genindex.html" /> |
| 73 |
<link rel="search" title="検索" href="../../search.html" /> |
| 74 |
<link rel="next" title="5.2.2. groonga" href="groonga.html" /> |
| 75 |
<link rel="prev" title="5.2. HTTP" href="../http.html" /> |
| 76 |
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 77 |
<meta name="docsearch:language" content="ja"/> |
| 78 |
<meta name="docsearch:version" content="16.0.9" /> |
| 79 |
|
| 80 |
|
| 81 |
<script src="../../_static/searchtools.js"></script> |
| 82 |
<script src="../../_static/language_data.js"></script> |
| 83 |
<script src="../../searchindex.js"></script> |
| 84 |
|
| 85 |
</head> |
| 86 |
<body data-default-mode=""> |
| 87 |
|
| 88 |
|
| 89 |
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">本文へスキップ</a></div> |
| 90 |
|
| 91 |
|
| 92 |
<div id="pst-scroll-pixel-helper"></div> |
| 93 |
|
| 94 |
<button type="button" class="btn rounded-pill" id="pst-back-to-top"> |
| 95 |
<i class="fa-solid fa-arrow-up"></i>トップに戻る</button> |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
<dialog id="pst-search-dialog"> |
| 101 |
|
| 102 |
<form class="bd-search d-flex align-items-center" |
| 103 |
action="../../search.html" |
| 104 |
method="get"> |
| 105 |
<i class="fa-solid fa-magnifying-glass"></i> |
| 106 |
<input type="search" |
| 107 |
class="form-control" |
| 108 |
name="q" |
| 109 |
placeholder="Search the docs ..." |
| 110 |
aria-label="Search the docs ..." |
| 111 |
autocomplete="off" |
| 112 |
autocorrect="off" |
| 113 |
autocapitalize="off" |
| 114 |
spellcheck="false"/> |
| 115 |
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span> |
| 116 |
</form> |
| 117 |
</dialog> |
| 118 |
|
| 119 |
<div class="pst-async-banner-revealer d-none"> |
| 120 |
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="バージョン警告"></aside> |
| 121 |
</div> |
| 122 |
|
| 123 |
|
| 124 |
<header id="pst-header" class="bd-header navbar navbar-expand-lg bd-navbar d-print-none"> |
| 125 |
<div class="bd-header__inner bd-page-width"> |
| 126 |
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="サイトナビゲーション"> |
| 127 |
<span class="fa-solid fa-bars"></span> |
| 128 |
</button> |
| 129 |
|
| 130 |
|
| 131 |
<div class="col-lg-3 navbar-header-items__start"> |
| 132 |
|
| 133 |
<div class="navbar-item"> |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
<a class="navbar-brand logo" href="https://groonga.org/ja/"> |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
<img src="../../_static/groonga.png" class="logo__image only-light" alt="Groonga v16.0.9ドキュメント - Home"/> |
| 151 |
<img src="../../_static/groonga.png" class="logo__image only-dark pst-js-only" alt="Groonga v16.0.9ドキュメント - Home"/> |
| 152 |
|
| 153 |
|
| 154 |
</a></div> |
| 155 |
|
| 156 |
</div> |
| 157 |
|
| 158 |
<div class="col-lg-9 navbar-header-items"> |
| 159 |
|
| 160 |
|
| 161 |
<div class="navbar-header-items__end"> |
| 162 |
|
| 163 |
<div class="navbar-item navbar-persistent--container"> |
| 164 |
|
| 165 |
|
| 166 |
<button class="btn search-button-field search-button__button pst-js-only" title="検索" aria-label="検索" data-bs-placement="bottom" data-bs-toggle="tooltip"> |
| 167 |
<i class="fa-solid fa-magnifying-glass"></i> |
| 168 |
<span class="search-button__default-text">検索</span> |
| 169 |
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span> |
| 170 |
</button> |
| 171 |
</div> |
| 172 |
|
| 173 |
|
| 174 |
<div class="navbar-item"> |
| 175 |
|
| 176 |
<div class="theme-switch-container dropdown pst-js-only" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Color mode"> |
| 177 |
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button dropdown-toggle" aria-label="Color mode" data-bs-toggle="dropdown"> |
| 178 |
<i class="theme-switch fa-solid fa-sun fa-lg fa-fw" data-mode="light" title="ライト"></i> |
| 179 |
<i class="theme-switch fa-solid fa-moon fa-lg fa-fw" data-mode="dark" title="ダーク"></i> |
| 180 |
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg fa-fw" data-mode="auto" title="System Settings"></i> |
| 181 |
</button> |
| 182 |
<ul class="dropdown-menu dropdown-menu-end"> |
| 183 |
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg fa-fw me-1"></i>System Settings</button></li> |
| 184 |
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="light"><i class="fa-solid fa-sun fa-lg fa-fw me-1"></i>ライト</button></li> |
| 185 |
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="dark"><i class="fa-solid fa-moon fa-lg fa-fw me-1"></i>ダーク</button></li> |
| 186 |
</ul> |
| 187 |
</div></div> |
| 188 |
|
| 189 |
<div class="navbar-item"><ul class="navbar-icon-links" |
| 190 |
aria-label="Icon Links"> |
| 191 |
<li class="nav-item"> |
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
<a href="https://github.com/groonga/groonga" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-square-github fa-lg" aria-hidden="true"></i><span class="visually-hidden">GitHub</span></a> |
| 201 |
</li> |
| 202 |
<li class="nav-item"> |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
<a href="https://twitter.com/groonga" title="Twitter" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-square-twitter fa-lg" aria-hidden="true"></i><span class="visually-hidden">Twitter</span></a> |
| 212 |
</li> |
| 213 |
<li class="nav-item"> |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
<a href="/ja/blog" title="Blog" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fas fa-blog fa-lg" aria-hidden="true"></i><span class="visually-hidden">Blog</span></a> |
| 223 |
</li> |
| 224 |
</ul></div> |
| 225 |
|
| 226 |
<div class="navbar-item"> |
| 227 |
<div class="version-switcher__container dropdown pst-js-only"> |
| 228 |
<button id="pst-version-switcher-button-2" |
| 229 |
type="button" |
| 230 |
class="version-switcher__button btn btn-sm dropdown-toggle" |
| 231 |
data-bs-toggle="dropdown" |
| 232 |
aria-haspopup="listbox" |
| 233 |
aria-controls="pst-version-switcher-list-2" |
| 234 |
aria-label="Version switcher list" |
| 235 |
> |
| 236 |
Choose version |
| 237 |
<span class="caret"></span> |
| 238 |
</button> |
| 239 |
<div id="pst-version-switcher-list-2" |
| 240 |
class="version-switcher__menu dropdown-menu list-group-flush py-0" |
| 241 |
role="listbox" aria-labelledby="pst-version-switcher-button-2"> |
| 242 |
|
| 243 |
</div> |
| 244 |
</div></div> |
| 245 |
|
| 246 |
</div> |
| 247 |
|
| 248 |
</div> |
| 249 |
|
| 250 |
|
| 251 |
<div class="navbar-persistent--mobile"> |
| 252 |
|
| 253 |
<button class="btn search-button-field search-button__button pst-js-only" title="検索" aria-label="検索" data-bs-placement="bottom" data-bs-toggle="tooltip"> |
| 254 |
<i class="fa-solid fa-magnifying-glass"></i> |
| 255 |
<span class="search-button__default-text">検索</span> |
| 256 |
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span> |
| 257 |
</button> |
| 258 |
</div> |
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="このページでは"> |
| 263 |
<span class="fa-solid fa-outdent"></span> |
| 264 |
</button> |
| 265 |
|
| 266 |
</div> |
| 267 |
|
| 268 |
</header> |
| 269 |
|
| 270 |
|
| 271 |
<div class="bd-container"> |
| 272 |
<div class="bd-container__inner bd-page-width"> |
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
<dialog id="pst-primary-sidebar-modal"></dialog> |
| 277 |
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar"> |
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
<div class="sidebar-header-items sidebar-primary__section"> |
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
<div class="sidebar-header-items__end"> |
| 287 |
|
| 288 |
<div class="navbar-item"> |
| 289 |
|
| 290 |
<div class="theme-switch-container dropdown pst-js-only" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Color mode"> |
| 291 |
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button dropdown-toggle" aria-label="Color mode" data-bs-toggle="dropdown"> |
| 292 |
<i class="theme-switch fa-solid fa-sun fa-lg fa-fw" data-mode="light" title="ライト"></i> |
| 293 |
<i class="theme-switch fa-solid fa-moon fa-lg fa-fw" data-mode="dark" title="ダーク"></i> |
| 294 |
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg fa-fw" data-mode="auto" title="System Settings"></i> |
| 295 |
</button> |
| 296 |
<ul class="dropdown-menu dropdown-menu-end"> |
| 297 |
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg fa-fw me-1"></i>System Settings</button></li> |
| 298 |
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="light"><i class="fa-solid fa-sun fa-lg fa-fw me-1"></i>ライト</button></li> |
| 299 |
<li><button class="dropdown-item d-flex align-items-center theme-change-button" data-mode="dark"><i class="fa-solid fa-moon fa-lg fa-fw me-1"></i>ダーク</button></li> |
| 300 |
</ul> |
| 301 |
</div></div> |
| 302 |
|
| 303 |
<div class="navbar-item"><ul class="navbar-icon-links" |
| 304 |
aria-label="Icon Links"> |
| 305 |
<li class="nav-item"> |
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
<a href="https://github.com/groonga/groonga" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-square-github fa-lg" aria-hidden="true"></i><span class="visually-hidden">GitHub</span></a> |
| 315 |
</li> |
| 316 |
<li class="nav-item"> |
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
<a href="https://twitter.com/groonga" title="Twitter" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-square-twitter fa-lg" aria-hidden="true"></i><span class="visually-hidden">Twitter</span></a> |
| 326 |
</li> |
| 327 |
<li class="nav-item"> |
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
<a href="/ja/blog" title="Blog" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fas fa-blog fa-lg" aria-hidden="true"></i><span class="visually-hidden">Blog</span></a> |
| 337 |
</li> |
| 338 |
</ul></div> |
| 339 |
|
| 340 |
<div class="navbar-item"> |
| 341 |
<div class="version-switcher__container dropdown pst-js-only"> |
| 342 |
<button id="pst-version-switcher-button-3" |
| 343 |
type="button" |
| 344 |
class="version-switcher__button btn btn-sm dropdown-toggle" |
| 345 |
data-bs-toggle="dropdown" |
| 346 |
aria-haspopup="listbox" |
| 347 |
aria-controls="pst-version-switcher-list-3" |
| 348 |
aria-label="Version switcher list" |
| 349 |
> |
| 350 |
Choose version |
| 351 |
<span class="caret"></span> |
| 352 |
</button> |
| 353 |
<div id="pst-version-switcher-list-3" |
| 354 |
class="version-switcher__menu dropdown-menu list-group-flush py-0" |
| 355 |
role="listbox" aria-labelledby="pst-version-switcher-button-3"> |
| 356 |
|
| 357 |
</div> |
| 358 |
</div></div> |
| 359 |
|
| 360 |
</div> |
| 361 |
|
| 362 |
</div> |
| 363 |
|
| 364 |
<div class="sidebar-primary-items__start sidebar-primary__section"> |
| 365 |
<div class="sidebar-primary-item pst-sidebar-collapse"><button id="pst-collapse-sidebar-button" aria-expanded="true" aria-controls="pst-primary-sidebar"> |
| 366 |
<svg class="pst-icon" role="img" aria-hidden="true" focusable="false" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> |
| 367 |
<path fill="currentColor" d="M3 15.5C2.36232 15.5 1.74874 15.2564 1.28478 14.8189C0.820828 14.3815 0.541576 13.7832 0.504167 13.1467L0.5 13L0.5 3C0.499965 2.36232 0.743605 1.74874 1.18107 1.28478C1.61854 0.820828 2.21676 0.541576 2.85333 0.504167L3 0.5L13 0.5C13.6377 0.499965 14.2513 0.743605 14.7152 1.18107C15.1792 1.61854 15.4584 2.21676 15.4958 2.85333L15.5 3L15.5 13C15.5 13.6377 15.2564 14.2513 14.8189 14.7152C14.3815 15.1792 13.7832 15.4584 13.1467 15.4958L13 15.5L3 15.5ZM3 13.8333L10.5 13.8333L10.5 2.16667L3 2.16667C2.79589 2.16669 2.59889 2.24163 2.44636 2.37726C2.29383 2.5129 2.19638 2.69979 2.1725 2.9025L2.16667 3L2.16667 13C2.16669 13.2041 2.24163 13.4011 2.37726 13.5536C2.5129 13.7062 2.69979 13.8036 2.9025 13.8275L3 13.8333ZM6.65583 10.325L6.5775 10.2558L4.91083 8.58917C4.76735 8.44567 4.68116 8.25476 4.66843 8.05223C4.65569 7.84971 4.71729 7.6495 4.84167 7.48917L4.91083 7.41083L6.5775 5.74417C6.72747 5.59471 6.9287 5.50794 7.14032 5.50148C7.35194 5.49502 7.55809 5.56935 7.7169 5.70937C7.8757 5.8494 7.97525 6.04463 7.99533 6.25539C8.01541 6.46616 7.95451 6.67667 7.825 6.84417L7.75583 6.9225L6.67917 8L7.75583 9.0775C7.89931 9.22099 7.98551 9.41191 7.99824 9.61443C8.01097 9.81695 7.94938 10.0172 7.825 10.1775L7.75583 10.2558C7.61234 10.3993 7.42142 10.4855 7.2189 10.4982C7.01638 10.511 6.81617 10.4494 6.65583 10.325Z"/> |
| 368 |
</svg> |
| 369 |
<span class="pst-collapse-sidebar-label">Collapse Sidebar</span> |
| 370 |
<span class="pst-expand-sidebar-label">Expand Sidebar</span> |
| 371 |
</button></div> |
| 372 |
<div class="sidebar-primary-item"> |
| 373 |
|
| 374 |
<nav class="bd-docs-nav bd-links" |
| 375 |
aria-label="セクションナビゲーション"> |
| 376 |
<p class="bd-links__title" role="heading" aria-level="1">セクションナビゲーション</p> |
| 377 |
<div class="bd-toc-item navbar-nav"><ul class="current nav bd-sidenav"> |
| 378 |
<li class="toctree-l1"><a class="reference internal" href="../package.html">5.1. サーバーパッケージ</a></li> |
| 379 |
<li class="toctree-l1 current active has-children"><a class="reference internal" href="../http.html">5.2. HTTP</a><details open="open"><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul class="current"> |
| 380 |
<li class="toctree-l2 current active"><a class="current reference internal" href="#">5.2.1. 比較</a></li> |
| 381 |
<li class="toctree-l2"><a class="reference internal" href="groonga.html">5.2.2. groonga</a></li> |
| 382 |
<li class="toctree-l2"><a class="reference internal" href="groonga-httpd.html">5.2.3. groonga-httpd</a></li> |
| 383 |
</ul> |
| 384 |
</details></li> |
| 385 |
<li class="toctree-l1"><a class="reference internal" href="../gqtp.html">5.3. GQTP</a></li> |
| 386 |
<li class="toctree-l1"><a class="reference internal" href="../memcached.html">5.4. Memcachedバイナリプロトコル</a></li> |
| 387 |
</ul> |
| 388 |
</div> |
| 389 |
</nav></div> |
| 390 |
</div> |
| 391 |
|
| 392 |
|
| 393 |
<div class="sidebar-primary-items__end sidebar-primary__section"> |
| 394 |
<div class="sidebar-primary-item"> |
| 395 |
<div id="ethical-ad-placement" |
| 396 |
class="flat" |
| 397 |
data-ea-publisher="readthedocs" |
| 398 |
data-ea-type="readthedocs-sidebar" |
| 399 |
data-ea-manual="true"> |
| 400 |
</div></div> |
| 401 |
</div> |
| 402 |
|
| 403 |
|
| 404 |
</div> |
| 405 |
|
| 406 |
<main id="main-content" class="bd-main" role="main"> |
| 407 |
|
| 408 |
|
| 409 |
<div class="bd-content"> |
| 410 |
<div class="bd-article-container"> |
| 411 |
|
| 412 |
<div class="bd-header-article d-print-none"> |
| 413 |
<div class="header-article-items header-article__inner"> |
| 414 |
|
| 415 |
<div class="header-article-items__start"> |
| 416 |
|
| 417 |
<div class="header-article-item"> |
| 418 |
|
| 419 |
<nav aria-label="パンくずリスト" class="d-print-none"> |
| 420 |
<ul class="bd-breadcrumbs"> |
| 421 |
|
| 422 |
<li class="breadcrumb-item breadcrumb-home"> |
| 423 |
<a href="../../index.html" class="nav-link" aria-label="ホーム"> |
| 424 |
<i class="fa-solid fa-home"></i> |
| 425 |
</a> |
| 426 |
</li> |
| 427 |
|
| 428 |
<li class="breadcrumb-item"><a href="../../server.html" class="nav-link"><span class="section-number">5. </span>サーバー</a></li> |
| 429 |
|
| 430 |
|
| 431 |
<li class="breadcrumb-item"><a href="../http.html" class="nav-link"><span class="section-number">5.2. </span>HTTP</a></li> |
| 432 |
|
| 433 |
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis"><span class="section-number">5.2.1. </span>比較</span></li> |
| 434 |
</ul> |
| 435 |
</nav> |
| 436 |
</div> |
| 437 |
|
| 438 |
</div> |
| 439 |
|
| 440 |
|
| 441 |
</div> |
| 442 |
</div> |
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
<div id="searchbox"></div> |
| 448 |
<article class="bd-article"> |
| 449 |
|
| 450 |
<section id="comparison"> |
| 451 |
<h1><span class="section-number">5.2.1. </span>比較<a class="headerlink" href="#comparison" title="Link to this heading">#</a></h1> |
| 452 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> と <a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> にはたくさんの違いがあります。以下はそれらの違いを示す比較表です。</p> |
| 453 |
<div class="pst-scrollable-table-container"><table class="table"> |
| 454 |
<thead> |
| 455 |
<tr class="row-odd"><th class="head"></th> |
| 456 |
<th class="head"><p>groonga</p></th> |
| 457 |
<th class="head"><p>groonga-httpd</p></th> |
| 458 |
</tr> |
| 459 |
</thead> |
| 460 |
<tbody> |
| 461 |
<tr class="row-even"><td><p>性能</p></td> |
| 462 |
<td><p>○</p></td> |
| 463 |
<td><p>○</p></td> |
| 464 |
</tr> |
| 465 |
<tr class="row-odd"><td><p>複数CPUコア対応</p></td> |
| 466 |
<td><p>○(マルチスレッドで対応)</p></td> |
| 467 |
<td><p>○(マルチプロセスで対応)</p></td> |
| 468 |
</tr> |
| 469 |
<tr class="row-even"><td><p>設定ファイル</p></td> |
| 470 |
<td><p>なくてもよい</p></td> |
| 471 |
<td><p>必須</p></td> |
| 472 |
</tr> |
| 473 |
<tr class="row-odd"><td><p>プレフィックスパスの変更</p></td> |
| 474 |
<td><p>×</p></td> |
| 475 |
<td><p>○</p></td> |
| 476 |
</tr> |
| 477 |
<tr class="row-even"><td><p>コマンドバージョンの変更</p></td> |
| 478 |
<td><p>○</p></td> |
| 479 |
<td><p>○</p></td> |
| 480 |
</tr> |
| 481 |
<tr class="row-odd"><td><p>複数データベース</p></td> |
| 482 |
<td><p>×</p></td> |
| 483 |
<td><p>○</p></td> |
| 484 |
</tr> |
| 485 |
<tr class="row-even"><td><p>認証</p></td> |
| 486 |
<td><p>×</p></td> |
| 487 |
<td><p>○</p></td> |
| 488 |
</tr> |
| 489 |
<tr class="row-odd"><td><p>gzip圧縮</p></td> |
| 490 |
<td><p>×</p></td> |
| 491 |
<td><p>○</p></td> |
| 492 |
</tr> |
| 493 |
<tr class="row-even"><td><p>POST</p></td> |
| 494 |
<td><p>○</p></td> |
| 495 |
<td><p>○</p></td> |
| 496 |
</tr> |
| 497 |
<tr class="row-odd"><td><p>HTTPS</p></td> |
| 498 |
<td><p>×</p></td> |
| 499 |
<td><p>○</p></td> |
| 500 |
</tr> |
| 501 |
<tr class="row-even"><td><p>アクセスログ</p></td> |
| 502 |
<td><p>×</p></td> |
| 503 |
<td><p>○</p></td> |
| 504 |
</tr> |
| 505 |
<tr class="row-odd"><td><p>ダウンタイムなしでのアップグレード</p></td> |
| 506 |
<td><p>×</p></td> |
| 507 |
<td><p>○</p></td> |
| 508 |
</tr> |
| 509 |
</tbody> |
| 510 |
</table> |
| 511 |
</div> |
| 512 |
<section id="performance"> |
| 513 |
<h2><span class="section-number">5.2.1.1. </span>性能<a class="headerlink" href="#performance" title="Link to this heading">#</a></h2> |
| 514 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> と <a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> はどちらも非常に高速です。どちらも同じスループットで動きます。</p> |
| 515 |
</section> |
| 516 |
<section id="using-multi-cpu-cores"> |
| 517 |
<h2><span class="section-number">5.2.1.2. </span>複数CPUコア対応<a class="headerlink" href="#using-multi-cpu-cores" title="Link to this heading">#</a></h2> |
| 518 |
<p>Groongaは複数のCPUコアを使って性能を向上できます。 <a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> はマルチスレッドを使って性能を向上させます。 <a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> はマルチプロセスを使って性能を向上させます。</p> |
| 519 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> はデフォルトでCPUコアと同じ数のスレッドを使います。もし、CPUコアが8個あった場合は、デフォルトで8個のスレッドを使います。</p> |
| 520 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> はデフォルトで1つのプロセスを使います。複数のCPUコアを使う場合は <a class="reference external" href="http://nginx.org/en/docs/ngx_core_module.html#worker_processes">worker_processes</a> ディレクティブを設定する必要があります。CPUコアが8個ある場合は、以下のように設定ファイルに <code class="docutils literal notranslate"><span class="pre">worker_processes</span> <span class="pre">8</span></code> と指定します。:</p> |
| 521 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">worker_processes</span> <span class="mi">8</span><span class="p">;</span> |
| 522 |
|
| 523 |
<span class="n">http</span> <span class="p">{</span> |
| 524 |
<span class="c1"># ...</span> |
| 525 |
<span class="p">}</span> |
| 526 |
</pre></div> |
| 527 |
</div> |
| 528 |
</section> |
| 529 |
<section id="configuration-file"> |
| 530 |
<h2><span class="section-number">5.2.1.3. </span>設定ファイル<a class="headerlink" href="#configuration-file" title="Link to this heading">#</a></h2> |
| 531 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> は設定ファイルがなくても動きます。ポート番号や最大スレッド数などといった設定項目はすべてコマンドラインから指定できます。設定ファイルを使っても設定項目を指定することができます。</p> |
| 532 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> はいくつかのオプションを指定するだけで実行できるので、非常に簡単にgroonga用のHTTPサーバーを起動することができます。以下は <a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> でHTTPサーバーを起動する一番簡単なコマンドラインです。:</p> |
| 533 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">groonga</span> <span class="o">--</span><span class="n">protocol</span> <span class="n">http</span> <span class="o">-</span><span class="n">d</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">DATABASE</span> |
| 534 |
</pre></div> |
| 535 |
</div> |
| 536 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> を実行するには設定ファイルが必須です。以下は <a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> でHTTPサーバーを実行する一番簡単な設定ファイルです。:</p> |
| 537 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">events</span> <span class="p">{</span> |
| 538 |
<span class="p">}</span> |
| 539 |
|
| 540 |
<span class="n">http</span> <span class="p">{</span> |
| 541 |
<span class="n">server</span> <span class="p">{</span> |
| 542 |
<span class="n">listen</span> <span class="mi">10041</span><span class="p">;</span> |
| 543 |
|
| 544 |
<span class="n">location</span> <span class="o">/</span><span class="n">d</span><span class="o">/</span> <span class="p">{</span> |
| 545 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 546 |
<span class="n">groonga_database</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">DATABASE</span><span class="p">;</span> |
| 547 |
<span class="p">}</span> |
| 548 |
<span class="p">}</span> |
| 549 |
<span class="p">}</span> |
| 550 |
</pre></div> |
| 551 |
</div> |
| 552 |
</section> |
| 553 |
<section id="custom-prefix-path"> |
| 554 |
<h2><span class="section-number">5.2.1.4. </span>プレフィックスパスの変更<a class="headerlink" href="#custom-prefix-path" title="Link to this heading">#</a></h2> |
| 555 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> は <code class="docutils literal notranslate"><span class="pre">/d/</span></code> から始まるパスをコマンドURLとして受け付けます。例えば、 <code class="docutils literal notranslate"><span class="pre">http://localhost:10041/d/status</span></code> となります。この <code class="docutils literal notranslate"><span class="pre">/d/</span></code> というプレフィックスパスを変更することはできません。</p> |
| 556 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> はプレフィックスパスを変更することができます。例えば、 <code class="docutils literal notranslate"><span class="pre">http://localhost:10041/api/status</span></code> というコマンドURLを使うことができます。以下は <code class="docutils literal notranslate"><span class="pre">/api/</span></code> をプレフィックスパスとして使う設定例です。:</p> |
| 557 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">events</span> <span class="p">{</span> |
| 558 |
<span class="p">}</span> |
| 559 |
|
| 560 |
<span class="n">http</span> <span class="p">{</span> |
| 561 |
<span class="n">server</span> <span class="p">{</span> |
| 562 |
<span class="n">listen</span> <span class="mi">10041</span><span class="p">;</span> |
| 563 |
|
| 564 |
<span class="n">location</span> <span class="o">/</span><span class="n">api</span><span class="o">/</span> <span class="p">{</span> <span class="c1"># <- change this</span> |
| 565 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 566 |
<span class="n">groonga_database</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">DATABASE</span><span class="p">;</span> |
| 567 |
<span class="p">}</span> |
| 568 |
<span class="p">}</span> |
| 569 |
<span class="p">}</span> |
| 570 |
</pre></div> |
| 571 |
</div> |
| 572 |
</section> |
| 573 |
<section id="custom-command-version"> |
| 574 |
<h2><span class="section-number">5.2.1.5. </span>コマンドバージョンの変更<a class="headerlink" href="#custom-command-version" title="Link to this heading">#</a></h2> |
| 575 |
<p>Groongaには <a class="reference internal" href="../../reference/command/command_version.html"><span class="doc">コマンドバージョン</span></a> という仕組みがあります。これは後方互換性を維持したままgroongaコマンドをアップグレードするための仕組みです。</p> |
| 576 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> は <code class="docutils literal notranslate"><span class="pre">--default-command-version</span></code> オプションでデフォルトのコマンドバージョンを変更できます。以下はデフォルトのコマンドバージョンとしてコマンドバージョン2を使うコマンドライン例です。:</p> |
| 577 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">groonga</span> <span class="o">--</span><span class="n">protocol</span> <span class="n">http</span> <span class="o">--</span><span class="n">default</span><span class="o">-</span><span class="n">command</span><span class="o">-</span><span class="n">version</span> <span class="mi">2</span> <span class="o">-</span><span class="n">d</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">DATABASE</span> |
| 578 |
</pre></div> |
| 579 |
</div> |
| 580 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> はまだデフォルトのコマンドバージョンを変更できません。しかし、すぐにサポートする予定です。サポートされたら、同じ <a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> プロセス内で異なったコマンドバージョンのgroongaコマンドを提供できます。以下はコマンドバージョン1のコマンドを <code class="docutils literal notranslate"><span class="pre">/api/1/</span></code> 以下で、コマンドバージョン2のコマンドを <code class="docutils literal notranslate"><span class="pre">/api/2/</span></code> 以下で提供するための設定例です。:</p> |
| 581 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">events</span> <span class="p">{</span> |
| 582 |
<span class="p">}</span> |
| 583 |
|
| 584 |
<span class="n">http</span> <span class="p">{</span> |
| 585 |
<span class="n">server</span> <span class="p">{</span> |
| 586 |
<span class="n">listen</span> <span class="mi">10041</span><span class="p">;</span> |
| 587 |
|
| 588 |
<span class="n">groonga_database</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">DATABASE</span><span class="p">;</span> |
| 589 |
|
| 590 |
<span class="n">location</span> <span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">1</span><span class="o">/</span> <span class="p">{</span> |
| 591 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 592 |
<span class="n">groonga_default_command_version</span> <span class="mi">1</span><span class="p">;</span> |
| 593 |
<span class="p">}</span> |
| 594 |
|
| 595 |
<span class="n">location</span> <span class="o">/</span><span class="n">api</span><span class="o">/</span><span class="mi">2</span><span class="o">/</span> <span class="p">{</span> |
| 596 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 597 |
<span class="n">groonga_default_command_version</span> <span class="mi">2</span><span class="p">;</span> |
| 598 |
<span class="p">}</span> |
| 599 |
<span class="p">}</span> |
| 600 |
<span class="p">}</span> |
| 601 |
</pre></div> |
| 602 |
</div> |
| 603 |
</section> |
| 604 |
<section id="multi-databases"> |
| 605 |
<h2><span class="section-number">5.2.1.6. </span>複数データベース<a class="headerlink" href="#multi-databases" title="Link to this heading">#</a></h2> |
| 606 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> は1つのプロセスで1つのデータベースしか使うことができません。</p> |
| 607 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> は同一プロセス内で複数のデータベースを使うことができます。以下は <code class="docutils literal notranslate"><span class="pre">/tmp/db1</span></code> にあるデータベースを <code class="docutils literal notranslate"><span class="pre">/db1/</span></code> 以下で、 <code class="docutils literal notranslate"><span class="pre">/tmp/db2</span></code> にあるデータベースを <code class="docutils literal notranslate"><span class="pre">/db2/</span></code> 以下で提供する設定例です。:</p> |
| 608 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">events</span> <span class="p">{</span> |
| 609 |
<span class="p">}</span> |
| 610 |
|
| 611 |
<span class="n">http</span> <span class="p">{</span> |
| 612 |
<span class="n">server</span> <span class="p">{</span> |
| 613 |
<span class="n">listen</span> <span class="mi">10041</span><span class="p">;</span> |
| 614 |
|
| 615 |
<span class="n">location</span> <span class="o">/</span><span class="n">db1</span><span class="o">/</span> <span class="p">{</span> |
| 616 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 617 |
<span class="n">groonga_database</span> <span class="o">/</span><span class="n">tmp</span><span class="o">/</span><span class="n">db1</span><span class="p">;</span> |
| 618 |
<span class="p">}</span> |
| 619 |
|
| 620 |
<span class="n">location</span> <span class="o">/</span><span class="n">db2</span><span class="o">/</span> <span class="p">{</span> |
| 621 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 622 |
<span class="n">groonga_database</span> <span class="o">/</span><span class="n">tmp</span><span class="o">/</span><span class="n">db2</span><span class="p">;</span> |
| 623 |
<span class="p">}</span> |
| 624 |
<span class="p">}</span> |
| 625 |
<span class="p">}</span> |
| 626 |
</pre></div> |
| 627 |
</div> |
| 628 |
</section> |
| 629 |
<section id="authentication"> |
| 630 |
<h2><span class="section-number">5.2.1.7. </span>認証<a class="headerlink" href="#authentication" title="Link to this heading">#</a></h2> |
| 631 |
<p>HTTPではベーシック認証やダイジェスト認証などの認証方法をサポートしています。認証することにより <a class="reference internal" href="../../reference/commands/shutdown.html"><span class="doc">shutdown</span></a> などのように危険なコマンドの実行を制限することができます。</p> |
| 632 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> では認証できません。危険なコマンドの使用を制限するためには、iptablesやリバースプロキシなど他のツールを使う必要があります。</p> |
| 633 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> はベーシック認証をサポートしています。以下は <a class="reference internal" href="../../reference/commands/shutdown.html"><span class="doc">shutdown</span></a> コマンドの使用を制限する設定例です。:</p> |
| 634 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">events</span> <span class="p">{</span> |
| 635 |
<span class="p">}</span> |
| 636 |
|
| 637 |
<span class="n">http</span> <span class="p">{</span> |
| 638 |
<span class="n">server</span> <span class="p">{</span> |
| 639 |
<span class="n">listen</span> <span class="mi">10041</span><span class="p">;</span> |
| 640 |
|
| 641 |
<span class="n">groonga_database</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">DATABASE</span><span class="p">;</span> |
| 642 |
|
| 643 |
<span class="n">location</span> <span class="o">/</span><span class="n">d</span><span class="o">/</span><span class="n">shutdown</span> <span class="p">{</span> |
| 644 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 645 |
<span class="n">auth_basic</span> <span class="s2">"manager is required!"</span><span class="p">;</span> |
| 646 |
<span class="n">auth_basic_user_file</span> <span class="s2">"/etc/managers.htpasswd"</span><span class="p">;</span> |
| 647 |
<span class="p">}</span> |
| 648 |
|
| 649 |
<span class="n">location</span> <span class="o">/</span><span class="n">d</span><span class="o">/</span> <span class="p">{</span> |
| 650 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 651 |
<span class="p">}</span> |
| 652 |
<span class="p">}</span> |
| 653 |
<span class="p">}</span> |
| 654 |
</pre></div> |
| 655 |
</div> |
| 656 |
</section> |
| 657 |
<section id="gzip-compression"> |
| 658 |
<h2><span class="section-number">5.2.1.8. </span>gzip圧縮<a class="headerlink" href="#gzip-compression" title="Link to this heading">#</a></h2> |
| 659 |
<p>HTTPは <code class="docutils literal notranslate"><span class="pre">Content-Encoding:</span> <span class="pre">gzip</span></code> レスポンスヘッダーを付けてgzipでレスポンスを圧縮する機能をサポートしています。これはネットワーク流量を小さくすることができます。大きな検索結果を返すときに有用です。</p> |
| 660 |
<p><a class="reference internal" href="groonga.html"><span class="doc">groonga</span></a> は圧縮をサポートしていません。圧縮をサポートするためには、リバースプロキシを使う必要があります。</p> |
| 661 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> はgzip圧縮をサポートしています。以下はレスポンスをgzipで圧縮する設定例です。:</p> |
| 662 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">events</span> <span class="p">{</span> |
| 663 |
<span class="p">}</span> |
| 664 |
|
| 665 |
<span class="n">http</span> <span class="p">{</span> |
| 666 |
<span class="n">server</span> <span class="p">{</span> |
| 667 |
<span class="n">listen</span> <span class="mi">10041</span><span class="p">;</span> |
| 668 |
|
| 669 |
<span class="n">groonga_database</span> <span class="o">/</span><span class="n">PATH</span><span class="o">/</span><span class="n">TO</span><span class="o">/</span><span class="n">DATABASE</span><span class="p">;</span> |
| 670 |
|
| 671 |
<span class="n">location</span> <span class="o">/</span><span class="n">d</span><span class="o">/</span> <span class="p">{</span> |
| 672 |
<span class="n">groonga</span> <span class="n">on</span><span class="p">;</span> |
| 673 |
<span class="n">gzip</span> <span class="n">on</span><span class="p">;</span> |
| 674 |
<span class="n">gzip_types</span> <span class="o">*</span><span class="p">;</span> |
| 675 |
<span class="p">}</span> |
| 676 |
<span class="p">}</span> |
| 677 |
<span class="p">}</span> |
| 678 |
</pre></div> |
| 679 |
</div> |
| 680 |
<p><cite>gzip_types *</cite> を指定していることに注意してください。この設定はとても重要な設定です。 <cite>gzip_types</cite> はgzip対象のデータフォーマットをMIMEタイプで指定します。 <a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> は JSON、XML、MessagePackのどれかのフォーマットでデータを返します。しかし、これらのフォーマットは <cite>gzip_types</cite> のデフォルト値に含まれていません。 <cite>gzip_types</cite> のデフォルト値は <cite>text/html</cite> です。</p> |
| 681 |
<p><a class="reference internal" href="groonga-httpd.html"><span class="doc">groonga-httpd</span></a> のレスポンスデータをgzip圧縮するには、明示的に <cite>gzip_types *</cite> または <cite>gzip_types application/json text/xml application/x-msgpack</cite> と指定する必要があります。 <cite>gzip_types *</cite> の方がおすすめです。理由は2つあります。1つは、groongaが、将来、他のフォーマットもサポートする可能性もあるからという理由です。2つめは、この <cite>location</cite> のすべてのリクエストはgroongaが処理するので、他のモジュールのことについて考えなくてもよいからという理由です。</p> |
| 682 |
</section> |
| 683 |
<section id="post"> |
| 684 |
<h2><span class="section-number">5.2.1.9. </span>POST<a class="headerlink" href="#post" title="Link to this heading">#</a></h2> |
| 685 |
<p>JSONデータをPOSTすることでデータをロードすることができます。POSTでロードする場合は以下のルールに従ってください。</p> |
| 686 |
<ul class="simple"> |
| 687 |
<li><p><cite>Content-Type</cite> ヘッダーの値を <cite>application/json</cite> にする。</p></li> |
| 688 |
<li><p>JSONデータはbodyとして送る。</p></li> |
| 689 |
<li><p>テーブル名は <code class="docutils literal notranslate"><span class="pre">table=名前</span></code> というようにクエリーパラメーターで指定する。</p></li> |
| 690 |
</ul> |
| 691 |
<p>以下はcurlを使って <cite>alice</cite> と <cite>bob</cite> という2人のユーザーを <cite>Users</cite> テーブルにロードするコマンドラインの例です:</p> |
| 692 |
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span> <span class="n">curl</span> <span class="o">--</span><span class="n">data</span><span class="o">-</span><span class="n">binary</span> <span class="s1">'[{"_key": "alice"}, {"_key": "bob"}]'</span> <span class="o">-</span><span class="n">H</span> <span class="s2">"Content-Type: application/json"</span> <span class="s2">"http://localhost:10041/d/load?table=Users"</span> |
| 693 |
</pre></div> |
| 694 |
</div> |
| 695 |
</section> |
| 696 |
<section id="https"> |
| 697 |
<h2><span class="section-number">5.2.1.10. </span>HTTPS<a class="headerlink" href="#https" title="Link to this heading">#</a></h2> |
| 698 |
<p>TODO</p> |
| 699 |
</section> |
| 700 |
<section id="access-log"> |
| 701 |
<h2><span class="section-number">5.2.1.11. </span>アクセスログ<a class="headerlink" href="#access-log" title="Link to this heading">#</a></h2> |
| 702 |
<p>TODO</p> |
| 703 |
</section> |
| 704 |
<section id="upgrading-without-downtime"> |
| 705 |
<h2><span class="section-number">5.2.1.12. </span>ダウンタイムなしでのアップグレード<a class="headerlink" href="#upgrading-without-downtime" title="Link to this heading">#</a></h2> |
| 706 |
<p>TODO</p> |
| 707 |
</section> |
| 708 |
</section> |
| 709 |
|
| 710 |
|
| 711 |
</article> |
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
|
| 717 |
<footer class="prev-next-footer d-print-none"> |
| 718 |
|
| 719 |
<div class="prev-next-area"> |
| 720 |
<a class="left-prev" |
| 721 |
href="../http.html" |
| 722 |
title="前のページ"> |
| 723 |
<i class="fa-solid fa-angle-left"></i> |
| 724 |
<div class="prev-next-info"> |
| 725 |
<p class="prev-next-subtitle">前へ</p> |
| 726 |
<p class="prev-next-title"><span class="section-number">5.2. </span>HTTP</p> |
| 727 |
</div> |
| 728 |
</a> |
| 729 |
<a class="right-next" |
| 730 |
href="groonga.html" |
| 731 |
title="次ページ"> |
| 732 |
<div class="prev-next-info"> |
| 733 |
<p class="prev-next-subtitle">次へ</p> |
| 734 |
<p class="prev-next-title"><span class="section-number">5.2.2. </span>groonga</p> |
| 735 |
</div> |
| 736 |
<i class="fa-solid fa-angle-right"></i> |
| 737 |
</a> |
| 738 |
</div> |
| 739 |
</footer> |
| 740 |
|
| 741 |
</div> |
| 742 |
|
| 743 |
|
| 744 |
|
| 745 |
<dialog id="pst-secondary-sidebar-modal"></dialog> |
| 746 |
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner"> |
| 747 |
|
| 748 |
|
| 749 |
<div class="sidebar-secondary-item"> |
| 750 |
<div |
| 751 |
id="pst-page-navigation-heading-2" |
| 752 |
class="page-toc tocsection onthispage"> |
| 753 |
<i class="fa-solid fa-list"></i> このページでは |
| 754 |
</div> |
| 755 |
<nav id="pst-page-toc-nav" class="page-toc" aria-labelledby="pst-page-navigation-heading-2"> |
| 756 |
<ul class="pst-show_toc_level nav section-nav flex-column"> |
| 757 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#performance">5.2.1.1. 性能</a></li> |
| 758 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#using-multi-cpu-cores">5.2.1.2. 複数CPUコア対応</a></li> |
| 759 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#configuration-file">5.2.1.3. 設定ファイル</a></li> |
| 760 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#custom-prefix-path">5.2.1.4. プレフィックスパスの変更</a></li> |
| 761 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#custom-command-version">5.2.1.5. コマンドバージョンの変更</a></li> |
| 762 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#multi-databases">5.2.1.6. 複数データベース</a></li> |
| 763 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#authentication">5.2.1.7. 認証</a></li> |
| 764 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#gzip-compression">5.2.1.8. gzip圧縮</a></li> |
| 765 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#post">5.2.1.9. POST</a></li> |
| 766 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#https">5.2.1.10. HTTPS</a></li> |
| 767 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#access-log">5.2.1.11. アクセスログ</a></li> |
| 768 |
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#upgrading-without-downtime">5.2.1.12. ダウンタイムなしでのアップグレード</a></li> |
| 769 |
</ul> |
| 770 |
</nav></div> |
| 771 |
|
| 772 |
</div></div> |
| 773 |
|
| 774 |
|
| 775 |
</div> |
| 776 |
<footer class="bd-footer-content"> |
| 777 |
|
| 778 |
</footer> |
| 779 |
|
| 780 |
</main> |
| 781 |
</div> |
| 782 |
</div> |
| 783 |
|
| 784 |
|
| 785 |
<script defer src="../../_static/scripts/bootstrap.js?digest=90905a2f556bf617f1a9"></script> |
| 786 |
<script defer src="../../_static/scripts/pydata-sphinx-theme.js?digest=90905a2f556bf617f1a9"></script> |
| 787 |
|
| 788 |
<footer class="bd-footer"> |
| 789 |
<div class="bd-footer__inner bd-page-width"> |
| 790 |
|
| 791 |
<div class="footer-items__start"> |
| 792 |
|
| 793 |
<div class="footer-item"> |
| 794 |
|
| 795 |
<p class="copyright"> |
| 796 |
|
| 797 |
© Copyright 2009-2026 Groonga Project. |
| 798 |
<br/> |
| 799 |
|
| 800 |
</p> |
| 801 |
</div> |
| 802 |
|
| 803 |
</div> |
| 804 |
|
| 805 |
|
| 806 |
|
| 807 |
<div class="footer-items__end"> |
| 808 |
|
| 809 |
<div class="footer-item"> |
| 810 |
<p class="theme-version"> |
| 811 |
|
| 812 |
<a href="https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html">PyData Sphinx Theme</a> 0.20.0 で構築されています。 |
| 813 |
</p></div> |
| 814 |
|
| 815 |
</div> |
| 816 |
|
| 817 |
</div> |
| 818 |
|
| 819 |
</footer> |
| 820 |
</body> |
| 821 |
</html> |