Skip to content

Commit

Permalink
better logo and README
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaong committed Oct 1, 2018
1 parent 81b22d2 commit cd6e1e6
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 11 deletions.
Binary file modified MiniSearch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions MiniSearch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# MiniSearch

`MiniSearch` is a tiny but powerful embedded full-text search engine for
`MiniSearch` is a tiny but powerful in-memory full-text search engine for
JavaScript. It is respectful of resources, so it can comfortably run both in
Node and in the browser, but it can do a lot.

## Use case:

`MiniSearch` addresses use cases where full-text search features are needed
(e.g. prefix search, fuzzy search, boosting of fields), but the data to be
indexed can fit locally in the process memory. While you won't be able to index
the whole Wikipedia with it, there are surprisingly many use cases that are
served well by `MiniSearch`. By storing the index locally, `MiniSearch` can work
indexed can fit locally in the process memory. While you may not index the whole
Wikipedia with it, there are surprisingly many use cases that are served well by
`MiniSearch`. By storing the index in local memory, `MiniSearch` can work
offline, and can process queries quickly, without network latency.

A prominent use-case is search-as-you-type features in Web and mobile
A prominent use-case is search-as-you-type features in web and mobile
applications, where keeping the index on the client-side enables fast and
reactive UI, removing the need to make requests to a search server.

Expand Down
Binary file modified docs/image/brand_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
</div>
</nav>

<div class="content" data-ice="content"><div data-ice="index" class="github-markdown"><h1 id="minisearch">MiniSearch</h1><p><code>MiniSearch</code> is a tiny but powerful embedded full-text search engine for
<div class="content" data-ice="content"><div data-ice="index" class="github-markdown"><h1 id="minisearch">MiniSearch</h1><p><code>MiniSearch</code> is a tiny but powerful in-memory full-text search engine for
JavaScript. It is respectful of resources, so it can comfortably run both in
Node and in the browser, but it can do a lot.</p>
<h2 id="use-case-">Use case:</h2><p><code>MiniSearch</code> addresses use cases where full-text search features are needed
(e.g. prefix search, fuzzy search, boosting of fields), but the data to be
indexed can fit locally in the process memory. While you won&apos;t be able to index
the whole Wikipedia with it, there are surprisingly many use cases that are
served well by <code>MiniSearch</code>. By storing the index locally, <code>MiniSearch</code> can work
indexed can fit locally in the process memory. While you may not index the whole
Wikipedia with it, there are surprisingly many use cases that are served well by
<code>MiniSearch</code>. By storing the index in local memory, <code>MiniSearch</code> can work
offline, and can process queries quickly, without network latency.</p>
<p>A prominent use-case is search-as-you-type features in Web and mobile
<p>A prominent use-case is search-as-you-type features in web and mobile
applications, where keeping the index on the client-side enables fast and
reactive UI, removing the need to make requests to a search server.</p>
<h2 id="design-goals-">Design goals:</h2><ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2940,7 +2940,7 @@
},
{
"kind": "index",
"content": "# MiniSearch\n\n`MiniSearch` is a tiny but powerful embedded full-text search engine for\nJavaScript. It is respectful of resources, so it can comfortably run both in\nNode and in the browser, but it can do a lot.\n\n## Use case:\n\n`MiniSearch` addresses use cases where full-text search features are needed\n(e.g. prefix search, fuzzy search, boosting of fields), but the data to be\nindexed can fit locally in the process memory. While you won't be able to index\nthe whole Wikipedia with it, there are surprisingly many use cases that are\nserved well by `MiniSearch`. By storing the index locally, `MiniSearch` can work\noffline, and can process queries quickly, without network latency.\n\nA prominent use-case is search-as-you-type features in Web and mobile\napplications, where keeping the index on the client-side enables fast and\nreactive UI, removing the need to make requests to a search server.\n\n## Design goals:\n\n * Memory-efficient index, able to store tens of thousands of documents and\n terms in memory, even in the browser.\n\n * Exact match, prefix match and fuzzy match, all with a single performant and\n multi-purpose index data structure.\n\n * Small and maintainable code base, well tested, with no external dependency.\n\n * Provide good building blocks that empower developers to build solutions to\n their specific problems, rather than try to offer a general-purpose tool to\n satisfy every use-case at the cost of complexity.\n\n## Installation:\n\nWith `npm`:\n\n```\nnpm install --save minisearch\n```\n\nWith `yarn`:\n\n```\nyarn add minisearch\n```\n\n## Usage:\n\n[API documentation](https://lucaong.github.io/minisearch/identifiers.html) is\navailable, but here are some quick examples:\n\n```javascript\n// A collection of documents for our example\nconst documents = [\n { id: 1, title: 'Moby Dick', text: 'Call me Ishmael. Some years ago...' },\n { id: 2, title: 'Zen and the Art of Motorcycle Maintenance', text: 'I can see by my watch...' },\n { id: 3, title: 'Neuromancer', text: 'The sky above the port was...' },\n { id: 4, title: 'Zen and the Art of Archery', text: 'At first sight it must seem...' },\n // ...and more\n]\n\nlet miniSearch = new MiniSearch({ fields: ['title', 'text'] })\n\n// Index all documents\nminiSearch.addAll(documents)\n\n// Search with default options\nlet results = miniSearch.search('zen art motorcycle')\n// => [ { id: 2, score: 2.77258 }, { id: 4, score: 1.38629 } ]\n\n// Search only specific fields\nresults = miniSearch.search('zen', { fields: ['title'] })\n\n// Boost fields\nresults = miniSearch.search('zen', { boost: { title: 2 } })\n\n// Prefix search\nresults = miniSearch.search('moto', {\n termToQuery: term => ({ term, prefix: true })\n})\n\n// Fuzzy search (in this example, with a max edit distance of 0.2 * term length,\n// rounded to nearest integer)\nresults = miniSearch.search('ismael', {\n termToQuery: term => ({ term, fuzzy: 0.2 })\n})\n\n// Set default search options upon initialization\nminiSearch = new MiniSearch({\n fields: ['title', 'text'],\n searchOptions: {\n boost: { title: 2 },\n termToQuery: term => ({ term, fuzzy: 0.2 })\n }\n})\nminiSearch.addAll(documents)\n\n// Will now by default perform fuzzy search and boost \"title\":\nresults = miniSearch.search('zen and motorcycles')\n```\n",
"content": "# MiniSearch\n\n`MiniSearch` is a tiny but powerful in-memory full-text search engine for\nJavaScript. It is respectful of resources, so it can comfortably run both in\nNode and in the browser, but it can do a lot.\n\n## Use case:\n\n`MiniSearch` addresses use cases where full-text search features are needed\n(e.g. prefix search, fuzzy search, boosting of fields), but the data to be\nindexed can fit locally in the process memory. While you may not index the whole\nWikipedia with it, there are surprisingly many use cases that are served well by\n`MiniSearch`. By storing the index in local memory, `MiniSearch` can work\noffline, and can process queries quickly, without network latency.\n\nA prominent use-case is search-as-you-type features in web and mobile\napplications, where keeping the index on the client-side enables fast and\nreactive UI, removing the need to make requests to a search server.\n\n## Design goals:\n\n * Memory-efficient index, able to store tens of thousands of documents and\n terms in memory, even in the browser.\n\n * Exact match, prefix match and fuzzy match, all with a single performant and\n multi-purpose index data structure.\n\n * Small and maintainable code base, well tested, with no external dependency.\n\n * Provide good building blocks that empower developers to build solutions to\n their specific problems, rather than try to offer a general-purpose tool to\n satisfy every use-case at the cost of complexity.\n\n## Installation:\n\nWith `npm`:\n\n```\nnpm install --save minisearch\n```\n\nWith `yarn`:\n\n```\nyarn add minisearch\n```\n\n## Usage:\n\n[API documentation](https://lucaong.github.io/minisearch/identifiers.html) is\navailable, but here are some quick examples:\n\n```javascript\n// A collection of documents for our example\nconst documents = [\n { id: 1, title: 'Moby Dick', text: 'Call me Ishmael. Some years ago...' },\n { id: 2, title: 'Zen and the Art of Motorcycle Maintenance', text: 'I can see by my watch...' },\n { id: 3, title: 'Neuromancer', text: 'The sky above the port was...' },\n { id: 4, title: 'Zen and the Art of Archery', text: 'At first sight it must seem...' },\n // ...and more\n]\n\nlet miniSearch = new MiniSearch({ fields: ['title', 'text'] })\n\n// Index all documents\nminiSearch.addAll(documents)\n\n// Search with default options\nlet results = miniSearch.search('zen art motorcycle')\n// => [ { id: 2, score: 2.77258 }, { id: 4, score: 1.38629 } ]\n\n// Search only specific fields\nresults = miniSearch.search('zen', { fields: ['title'] })\n\n// Boost fields\nresults = miniSearch.search('zen', { boost: { title: 2 } })\n\n// Prefix search\nresults = miniSearch.search('moto', {\n termToQuery: term => ({ term, prefix: true })\n})\n\n// Fuzzy search (in this example, with a max edit distance of 0.2 * term length,\n// rounded to nearest integer)\nresults = miniSearch.search('ismael', {\n termToQuery: term => ({ term, fuzzy: 0.2 })\n})\n\n// Set default search options upon initialization\nminiSearch = new MiniSearch({\n fields: ['title', 'text'],\n searchOptions: {\n boost: { title: 2 },\n termToQuery: term => ({ term, fuzzy: 0.2 })\n }\n})\nminiSearch.addAll(documents)\n\n// Will now by default perform fuzzy search and boost \"title\":\nresults = miniSearch.search('zen and motorcycles')\n```\n",
"longname": "/Users/luca/Code/minisearch/README.md",
"name": "./README.md",
"static": true,
Expand Down

0 comments on commit cd6e1e6

Please sign in to comment.