{"id":13678303,"url":"https://github.com/bleroy/lunr-core","last_synced_at":"2025-05-15T16:06:04.801Z","repository":{"id":42652103,"uuid":"275457654","full_name":"bleroy/lunr-core","owner":"bleroy","description":"Lunr-core is a small, full text search library for use in small applications. It's a .NET port of LUNR.js.","archived":false,"fork":false,"pushed_at":"2025-02-25T19:21:48.000Z","size":1640,"stargazers_count":568,"open_issues_count":3,"forks_count":25,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-05-08T14:52:10.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bleroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["bleroy"]}},"created_at":"2020-06-27T21:41:06.000Z","updated_at":"2025-05-01T03:14:05.000Z","dependencies_parsed_at":"2024-06-18T18:51:30.591Z","dependency_job_id":null,"html_url":"https://github.com/bleroy/lunr-core","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleroy%2Flunr-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleroy%2Flunr-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleroy%2Flunr-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bleroy%2Flunr-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bleroy","download_url":"https://codeload.github.com/bleroy/lunr-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374465,"owners_count":22060611,"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":[],"created_at":"2024-08-02T13:00:52.222Z","updated_at":"2025-05-15T16:06:04.772Z","avatar_url":"https://github.com/bleroy.png","language":"C#","funding_links":["https://github.com/sponsors/bleroy"],"categories":["others","C#","Search","Identifiers"],"sub_categories":["GUI - other"],"readme":"# lunr-core\n\nLunr-core is a small, full text search library for use in small applications.\n\nIt's a port of [lunr.js](https://lunrjs.com/guides/getting_started.html) to .NET Core.\nLunr is a bit like Solr, but much smaller and not as bright.\n\n![.NET Core](https://github.com/bleroy/lunr-core/workflows/.NET%20Core/badge.svg)\n\n## TODO / up for grabs\n\n* Multilingual support (lunr has optional support that remains to be ported)\n* Documentation (adapted from [lunr docs](https://lunrjs.com/guides/getting_started.html))\n\n## Example\n\nA very simple search index can be created using the following:\n\n```csharp\nvar index = await Index.Build(async builder =\u003e\n{\n    builder\n        .AddField(\"title\")\n        .AddField(\"body\");\n\n    await builder.Add(new Document\n    {\n        { \"title\", \"Twelfth-Night\" },\n        { \"body\", \"If music be the food of love, play on: Give me excess of it…\" },\n        { \"author\", \"William Shakespeare\" },\n        { \"id\", \"1\" },\n    });\n});\n```\n\nThen searching is as simple as:\n\n```csharp\nawait foreach (Result result in index.Search(\"love\"))\n{\n    // do something with that result\n}\n```\n\nThis returns a list of matching documents with a [score](https://lunrjs.com/guides/searching.html#scoring) of how closely they match, the search query as well as any associated metadata about the match:\n\n```csharp\nnew List\u003cResult\u003e\n{\n    new Result(\n        documentReference: \"1\",\n        score: 0.3535533905932737,\n        matchData: new MatchData(\n            term: \"love\",\n            field: \"body\"\n        )\n    )\n}\n```\n\n\u003c!--[API documentation](https://lunrjs.com/docs/index.html) is available, as well as a [full working example](https://olivernn.github.io/moonwalkers/).--\u003e\n\n## Description\n\nLunr-core is a small, full-text search library for use in small applications.\nIt indexes documents and provides a simple search interface for retrieving documents that best match text queries.\nIt is 100% compatible with [lunr.js](https://lunrjs.com/guides/getting_started.html), meaning that an index file prepared on the server with lunr-core can be used on the client using lunr.js.\n\n## Why\n\nLunr-core is suitable for small applications that require a simple search engine but without the overhead of a full-scale search engine such as Lucene.\nIts compatibility with lunr.js also opens up some interesting client-side search scenarios.\n\n\u003c!--\n## Installation\n\nSimply include the lunr-core package in your application.\nLunr-core supports all .NET Standard 2.0 platforms, including .NET Core and .NET Framework 4.6.\n--\u003e\n\n## Features\n\n* Soon: Full text search support for 14 languages\n* Boost terms at query time or boost entire documents at index time\n* Scope searches to specific fields\n* Fuzzy term matching with wildcards or edit distance\n* No runtime dependencies beyond SDK, BCL AsyncInterfaces and System.Text.Json\n\n\u003c!--\n## Contributing\n\nSee the [`CONTRIBUTING.md` file](CONTRIBUTING.md).\n--\u003e\n\n## Credits\n\n* Original code by [Oliver Nightingale](https://github.com/olivernn) and contributors, ported to .NET Core by [Bertrand Le Roy](https://github.com/bleroy).\n* Icon adapted from https://commons.wikimedia.org/wiki/File:Internal_Structure_of_the_Moon.JPG by Iqbal Mahmud under Creative Commons Attribution Share Alike 4.0 International.\n* Perf tests use a [word list by Sindre Sorhus](https://github.com/sindresorhus/word-list).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleroy%2Flunr-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbleroy%2Flunr-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbleroy%2Flunr-core/lists"}