Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bulksearch

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bulksearch - npm Package Compare versions

Comparing version 0.1.2 to 0.1.201

5

bulksearch.js

@@ -5,2 +5,3 @@ /**!

* https://github.com/nextapps-de/bulksearch
* @version: 0.1.2
* @author: Thomas Wilkerling

@@ -377,3 +378,3 @@ * @license: Apache 2.0 Licence

(new cache(30 * 1000, 50, true))
:
:
false;

@@ -653,3 +654,3 @@ };

_query.split(' ')
:
:
[_query]

@@ -656,0 +657,0 @@ );

1

bulksearch.min.js
/**!
* BulkSearch - https://github.com/nextapps-de/bulksearch
* @version: 0.1.2
* @author: Thomas Wilkerling

@@ -4,0 +5,0 @@ * @license: Apache 2.0 Licence

{
"name": "bulksearch",
"version": "0.1.2",
"version": "0.1.201",
"description": "Superfast lightweight full text search engine.",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -14,3 +14,3 @@ # BulkSearch

<li>Flexible Word Order</li>
<li>Phonetic Search</li>
<li><a href="#phonetic">Phonetic Search</a></li>
<li>Limit Results</li>

@@ -72,3 +72,3 @@ <li>Caching</li>

### Create a new index
#### Create a new index

@@ -87,3 +87,3 @@ ```js

> BulkSearch.__create__(OPTIONS)
> BulkSearch.__create__(options)

@@ -105,6 +105,8 @@ ```js

### Add item to the index
__Read more:__ <a href="#phonetic">Phonetic Search</a>, <a href="#compare">Phonetic Comparison</a>, <a href="#memory">Improve Memory Usage</a>
> Index.__add___(ID, TEXT)
#### Add items to an index
> Index.__add___(id, string)
```js

@@ -114,46 +116,6 @@ index.add(10025, "John Doe");

__Note:__ The data type of passed IDs has to be specified on creation. It is recommended to uses to most lowest possible data range here, e.g. use "short" when IDs are not higher than 65,535.
#### Search items
<table>
<tr>
<td>ID Type</td>
<td>Range of Values</td>
<td>Memory of Index each ~ 100.000 Words</td>
</tr>
<tr></tr>
<tr>
<td>Byte</td>
<td>0 - 255</td>
<td>683 kb</td>
</tr>
<tr></tr>
<tr>
<td>Short</td>
<td>0 - 65,535</td>
<td>1.3 Mb</td>
</tr>
<tr></tr>
<tr>
<td>Integer</td>
<td>0 - 4,294,967,295</td>
<td>2,7 Mb</td>
</tr>
<tr></tr>
<tr>
<td>Float</td>
<td>0 - * (16 digits)</td>
<td>5,3 Mb</td>
</tr>
<tr></tr>
<tr>
<td>String</td>
<td>(unlimited)</td>
<td>1,3 Mb * <u><b>char count of IDs</b></u></td>
</tr>
</table>
> Index.__search__(string, limit, callback)
### Search items
> Index.__search__(TEXT, LIMIT, CALLBACK)
```js

@@ -163,3 +125,3 @@ index.search("John");

##### limit the result
##### Limit the result

@@ -170,3 +132,3 @@ ```js

##### perform queries asynchronously
##### Perform queries asynchronously

@@ -180,5 +142,5 @@ ```js

### Update item to the index
#### Update item to the index
> Index.__update__(ID, TEXT)
> Index.__update__(id, string)

@@ -189,5 +151,5 @@ ```js

### Remove item to the index
#### Remove item to the index
> Index.__remove__(ID)
> Index.__remove__(id)

@@ -198,21 +160,11 @@ ```js

### Optimize/Cleanup the index
#### Destroy the index
> Index.__cleanup__()
```js
index.cleanup();
```
### Destroy the index
> Index.__destroy__()
```js
index.destroy();
```
### Initialize the index
#### Initialize the index
> Index.__init__(OPTIONS)
> Index.__init__(options)

@@ -223,5 +175,5 @@ ```js

### Add custom matcher
#### Add custom matcher
> Index.__addMatcher__(KEY_VALUE_PAIRS)
> Index.__addMatcher__(_KEY_VALUE_PAIRS_)

@@ -237,3 +189,3 @@ ```js

### Add custom encoder
#### Add custom encoder

@@ -252,6 +204,4 @@ ```js

### Get info
#### Get info
> Index.__info__()
```js

@@ -279,6 +229,4 @@ index.info();

### Optimize / Cleanup index
#### Optimize / Cleanup index
> Index.__cleanup__()
```js

@@ -288,4 +236,177 @@ index.cleanup();

## Calculate RAM
<a name="phonetic" id="phonetic"></a>
## Phonetic Encoding
<table>
<tr>
<th align="left">Option</th>
<th align="left">Description</th>
<th align="left">Example</th>
</tr>
<tr></tr>
<tr>
<td><b>false</b></td>
<td>Turn off encoding</td>
<td>
Reference: "Björn-Phillipp Mayer"<br>
Matches: "Phil"
</td>
</tr>
<tr></tr>
<tr>
<td><b>icase</b></td>
<td>Case in-sensitive encoding</td>
<td>
Reference: "Björn-Phillipp Mayer"<br>
Matches: "phil"
</td>
</tr>
<tr></tr>
<tr>
<td><b>simple</b></td>
<td>Phonetic normalizations</td>
<td>
Reference: "Björn-Phillipp Mayer"<br>
Matches: "bjoern fillip"
</td>
</tr>
<tr></tr>
<tr>
<td><b>advanced</b></td>
<td>Phonetic normalizations + transformations</td>
<td>
Reference: "Björn-Phillipp Mayer"<br>
Matches: "filip meier"
</td>
</tr>
</table>
<a name="compare" id="compare"></a>
### Compare Phonetic Search Results
Reference String: __"Björn-Phillipp Mayer"__
<table>
<tr>
<th align="left">Query</th>
<th align="left">ElasticSearch</th>
<th align="left">BulkSearch (iCase)</th>
<th align="left">BulkSearch (Simple)</th>
<th align="left">BulkSearch (Adv.)</th>
</tr>
<tr>
<td>björn</td>
<td><b>yes</b></td>
<td><b>yes</b></td>
<td><b>yes</b></td>
<td><b>yes</b></td>
</tr>
<tr>
<td>björ</td>
<td>no</td>
<td><b>yes</b></td>
<td><b>yes</b></td>
<td><b>yes</b></td>
</tr>
<tr>
<td>bjorn</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
<td><b>yes</b></td>
</tr>
<tr>
<td>bjoern</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
</tr>
<tr>
<td>philipp</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
</tr>
<tr>
<td>filip</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
</tr>
<tr>
<td>björnphillip</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
<td><b>yes</b></td>
</tr>
<tr>
<td>meier</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
</tr>
<tr>
<td>björn meier</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
</tr>
<tr>
<td>meier filip</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td><b>yes</b></td>
</tr>
</table>
<a name="memory" id="memory"></a>
## Improve Memory Usage
__Note:__ The data type of passed IDs has to be specified on creation. It is recommended to uses to most lowest possible data range here, e.g. use "short" when IDs are not higher than 65,535.
<table>
<tr>
<th align="left">ID Type</th>
<th align="left">Range of Values</th>
<th align="left">Memory Usage of every ~ 100,000 Words</th>
</tr>
<tr></tr>
<tr>
<td>Byte</td>
<td>0 - 255</td>
<td>683 kb + 1.3 Mb</td>
</tr>
<tr></tr>
<tr>
<td>Short</td>
<td>0 - 65,535</td>
<td>1.3 Mb + 1.3 Mb</td>
</tr>
<tr></tr>
<tr>
<td>Integer</td>
<td>0 - 4,294,967,295</td>
<td>2.7 Mb + 1.3 Mb</td>
</tr>
<tr></tr>
<tr>
<td>Float</td>
<td>0 - * (16 digits)</td>
<td>5.3 Mb + 1.3 Mb</td>
</tr>
<tr></tr>
<tr>
<td>String</td>
<td>* (unlimited)</td>
<td>1.3 Mb <b>* <u>char count of IDs</u></b> + 1.3 Mb</td>
</tr>
</table>
The required RAM per instance can be calculated as follow:

@@ -297,2 +418,3 @@

---

@@ -299,0 +421,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc