<commit_before>![npm version](https://img.shields.io/npm/v/itemsjs)
![GitHub package.json version](https://img.shields.io/github/package-json/v/itemsapi/itemsjs?label=package.json)
[![NPM monthly downloads](https://img.shields.io/npm/dm/itemsjs.svg)](https://img.shields.io/npm/dm/itemsjs.svg)
[![GitHub license](https://img.shields.io/github/license/itemsapi/itemsjs)](https://github.com/itemsapi/itemsjs/blob/master/LICENSE)

# ItemsJS - search engine in javascript

Full text, faceted, dependency free search library in javascript.
Created to perform fast search on json dataset (up to 100K items).

## Demo

![demo](https://raw.githubusercontent.com/itemsapi/itemsjs/master/assets/electronics_search_demo.gif)

[See another demo examples](/docs/demo.md)

## Use cases

Itemsjs is being used mostly for data classification of companies, products, publications, documents, jobs or plants

The solution has been implemented by people from Amazon, Hermes, Apple, Microsoft, James Cook University, Carnegie Mellon University and more.
You can find a list of real implementations - [here](/docs/who-use-it.md) 

## Features

- faceted search
- full text
- pagination
- no dependencies (only javascript)
- working on backend and frontend
- working with custom full text search

## Getting Started

### NPM

```bash
npm install itemsjs
```

```js
const itemsjs = require('itemsjs')(data, configuration);
const items = itemsjs.search();
```

### Client side

or using from the client side:

```bash
npm install itemsjs
```

```html
<!-- CDN -->
<!-- unpkg: use the latest release -->
<script src="https://unpkg.com/itemsjs@latest/dist/itemsjs.min.js"></script>
<!-- unpkg: use a specific version -->
<script src="https://unpkg.com/itemsjs@1.0.49/dist/itemsjs.min.js"></script>
<!-- jsdelivr: use a specific version -->
<script src="https://cdn.jsdelivr.net/npm/itemsjs@1.0.49/dist/itemsjs.min.js"></script>

<!-- locally -->
<script src="/node_modules/itemsjs/dist/itemsjs.js"></script>
```

```js
itemsjs = itemsjs(data, configuration);
itemsjs.search()
```

Gulp task:

```javascript
function itemjs() {
  return src('node_modules/itemsjs/dist/itemsjs.min.js')
      .pipe(dest('source/javascripts/'));
}; // Will copy to source/javascripts/itemsjs.min.js
```

## Example

```bash
npm install itemsjs

# download json data
wget https://raw.githubusercontent.com/itemsapi/itemsapi-example-data/master/items/movies-processed.json -O data.json
```

Create `search.js`:
<commit_msg>Fixed data source (#102) (#103)<commit_after>![npm version](https://img.shields.io/npm/v/itemsjs)
![GitHub package.json version](https://img.shields.io/github/package-json/v/itemsapi/itemsjs?label=package.json)
[![NPM monthly downloads](https://img.shields.io/npm/dm/itemsjs.svg)](https://img.shields.io/npm/dm/itemsjs.svg)
[![GitHub license](https://img.shields.io/github/license/itemsapi/itemsjs)](https://github.com/itemsapi/itemsjs/blob/master/LICENSE)

# ItemsJS - search engine in javascript

Full text, faceted, dependency free search library in javascript.
Created to perform fast search on json dataset (up to 100K items).

## Demo

![demo](https://raw.githubusercontent.com/itemsapi/itemsjs/master/assets/electronics_search_demo.gif)

[See another demo examples](/docs/demo.md)

## Use cases

Itemsjs is being used mostly for data classification of companies, products, publications, documents, jobs or plants

The solution has been implemented by people from Amazon, Hermes, Apple, Microsoft, <NAME> University, Carnegie Mellon University and more.
You can find a list of real implementations - [here](/docs/who-use-it.md) 

## Features

- faceted search
- full text
- pagination
- no dependencies (only javascript)
- working on backend and frontend
- working with custom full text search

## Getting Started

### NPM

```bash
npm install itemsjs
```

```js
const itemsjs = require('itemsjs')(data, configuration);
const items = itemsjs.search();
```

### Client side

or using from the client side:

```bash
npm install itemsjs
```

```html
<!-- CDN -->
<!-- unpkg: use the latest release -->
<script src="https://unpkg.com/itemsjs@latest/dist/itemsjs.min.js"></script>
<!-- unpkg: use a specific version -->
<script src="https://unpkg.com/itemsjs@1.0.49/dist/itemsjs.min.js"></script>
<!-- jsdelivr: use a specific version -->
<script src="https://cdn.jsdelivr.net/npm/itemsjs@1.0.49/dist/itemsjs.min.js"></script>

<!-- locally -->
<script src="/node_modules/itemsjs/dist/itemsjs.js"></script>
```

```js
itemsjs = itemsjs(data, configuration);
itemsjs.search()
```

Gulp task:

```javascript
function itemjs() {
  return src('node_modules/itemsjs/dist/itemsjs.min.js')
      .pipe(dest('source/javascripts/'));
}; // Will copy to source/javascripts/itemsjs.min.js
```

## Example

```bash
npm install itemsjs

# download json data
wget https://raw.githubusercontent.com/itemsapi/itemsapi-example-data/master/items/imdb.json -O data.json
```

Create `search.js`:

{'fraction_non_alphanumeric': 0.1601373182552504, 'fraction_numerical': 0.005654281098546042, 'mean_word_length': 4.609286523216308, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 22, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1577049', 'n_tokens_mistral': 1679, 'n_tokens_neox': 1560, 'n_words': 391}