marian
1.0.0
Marian은 HTTP 전문 검색 서비스입니다.
node.js v8.0 이상이 필요합니다.
npm install
MAX_WORKERS=2 node ./src/index.js [MANIFEST_SOURCE]
그런 다음 Marian은 MANIFEST_SOURCE 에 제공된 Manifest 디렉토리를 읽고 포트 8080의 요청을 듣기 시작합니다.
Marian은 매니페스트 소스 디렉토리가 필요합니다. 이것은 로컬 경로 또는 아마존 S3 경로 일 수 있습니다. 예를 들어, dir:./manifests/ 또는 bucket:docs-mongodb-org-prod/search-indexes/ .
경로에는 다음 JSON 스키마가있는 JSON 파일 만 포함해야합니다.
{
"$id": "http://example.com/example.json",
"type": "object",
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"url": {
"$id": "/properties/url",
"type": "string",
"title": "The Url Schema ",
"default": ""
},
"includeInGlobalSearch": {
"$id": "/properties/includeInGlobalSearch",
"type": "boolean",
"title": "The Includeinglobalsearch Schema ",
"default": false
},
"aliases": {
"$id": "/properties/aliases",
"type": "array"
},
"documents": {
"$id": "/properties/documents",
"type": "array",
"items": {
"$id": "/properties/documents/items",
"type": "object",
"properties": {
"slug": {
"$id": "/properties/documents/items/properties/slug",
"type": "string",
"title": "The Slug Schema ",
"default": ""
},
"title": {
"$id": "/properties/documents/items/properties/title",
"type": "string",
"title": "The Title Schema ",
"default": ""
},
"headings": {
"$id": "/properties/documents/items/properties/headings",
"type": "array",
"items": {
"$id": "/properties/documents/items/properties/headings/items",
"type": "string",
"title": "The 0th Schema ",
"default": ""
}
},
"text": {
"$id": "/properties/documents/items/properties/text",
"type": "string",
"title": "The Text Schema ",
"default": ""
},
"preview": {
"$id": "/properties/documents/items/properties/preview",
"type": "string",
"title": "The Preview Schema ",
"default": "",
},
"tags": {
"$id": "/properties/documents/items/properties/tags",
"type": "string",
"title": "The Tags Schema ",
"default": ""
},
"links": {
"$id": "/properties/documents/items/properties/links",
"type": "array",
"items": {
"$id": "/properties/documents/items/properties/links/items",
"type": "string",
"title": "The 0th Schema ",
"default": ""
}
}
}
}
}
}
}
GET /search?q=<query>[&searchProperty=<searchProperty>]
Returns search results. For example, see https://marian.mongodb.com/search?q=aggregation%20pipeline
GET /status
Returns a status document
POST /refresh
When this endpoint is POSTed, Marian will rescan the manifest source
directory.