{"id":21994339,"url":"https://github.com/codelibs/fess-suggest","last_synced_at":"2025-04-30T16:47:59.863Z","repository":{"id":10589917,"uuid":"12801786","full_name":"codelibs/fess-suggest","owner":"codelibs","description":"Suggest Utility for Fess","archived":false,"fork":false,"pushed_at":"2025-04-13T09:42:56.000Z","size":2472,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-13T10:36:05.340Z","etag":null,"topics":["autocomplete","elasticsearch","java","suggestor"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codelibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-09-13T04:54:10.000Z","updated_at":"2025-03-15T06:51:26.000Z","dependencies_parsed_at":"2023-09-28T10:02:20.051Z","dependency_job_id":"0ec671f6-00cd-4527-a367-e7634740ee59","html_url":"https://github.com/codelibs/fess-suggest","commit_stats":null,"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffess-suggest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffess-suggest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffess-suggest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Ffess-suggest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelibs","download_url":"https://codeload.github.com/codelibs/fess-suggest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251747917,"owners_count":21637408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","elasticsearch","java","suggestor"],"created_at":"2024-11-29T21:08:30.678Z","updated_at":"2025-04-30T16:47:59.856Z","avatar_url":"https://github.com/codelibs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nfess-suggest\n[![Java CI with Maven](https://github.com/codelibs/fess-suggest/actions/workflows/maven.yml/badge.svg)](https://github.com/codelibs/fess-suggest/actions/workflows/maven.yml)\n============\n\nLibrary for suggest.\n\n## Usage\n\n### Create suggester instance\n\n```java\nString suggestId = \"id\";\nSuggester suggester = Suggester.builder().build(client, suggestId);\n\n```\n\n### Suggest\n\n```java\nSuggestResponse response = suggester.suggest().setQuery(\"kensaku\").execute().getResponse();\n```\n\n### Suggest async\n\n```\nsuggester.suggest().setQuery(\"kensaku\").execute()\n  .done(\n    response -\u003e {}\n  ).error(\n    t -\u003e {}\n  );\n```\n\n### Add suggest document\n\n```java\nString[][] readings = new String[2][];\nreadings[0] = new String[] { \"kensaku\", \"fuga\" };\nreadings[1] = new String[] { \"enjin\", \"fuga\" };\nString[] tags = new String[] { \"tag1\", \"tag2\" };\nString[] roles = new String[] { \"role1\", \"role2\", \"role3\" };\nsuggester.indexer().index(new SuggestItem(new String[] { \"検索\", \"エンジン\" }, readings, 1, tags, roles, SuggestItem.Kind.DOCUMENT));\n```\n\n### Add suggest documents from source of index\n\n```java\nDocumentReader reader = new ESSourceReader(\n    client,\n    suggester.settings(),\n    \"contentIndexName\",\n    \"contentTypeName\");\nsuggester.indexer().indexFromDocument(reader, 2, 100).getResponse();\n```\n\n### Add suggest document from queryLog\n\n```java\nQueryLog queryLog = new QueryLog(\"field1:value1\", null);\nsuggester.indexer().indexFromQueryLog(queryLog);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Ffess-suggest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelibs%2Ffess-suggest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Ffess-suggest/lists"}