Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ang-zeyu committed Dec 30, 2022
1 parent 98159f1 commit e2fed8f
Show file tree
Hide file tree
Showing 46 changed files with 130 additions and 146 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Update the cargo.toml version numbers before running anything!

# And this
VERSION=v0.9.1
VERSION=v0.10.0

# Run in order
# Check preReleaseXX outputs manually before running release
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Powering static site search with InfiSearch is extremely easy, and requires just

There are a couple of options for installing the indexer:
- Install the global npm package with `npm install -g @infisearch/cli`.
- If you have the rust / cargo toolchains setup, run `cargo install infisearch --vers 0.9.1`.
- If you have the rust / cargo toolchains setup, run `cargo install infisearch --vers 0.10.0`.
- You can also grab the cli binaries [here](https://github.com/ang-zeyu/infisearch/releases).

### 2. Running the indexer
Expand All @@ -49,9 +49,9 @@ Add the following resources to your pages:

```html
<!-- Search UI script -->
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.9.1/packages/search-ui/dist/search-ui.ascii.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.10.0/packages/search-ui/dist/search-ui.ascii.bundle.js"></script>
<!-- Search UI css, this provides some basic styling for the search dropdown, and can be omitted if desired -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.9.1/packages/search-ui/dist/search-ui-light.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.10.0/packages/search-ui/dist/search-ui-light.css" />
```

If you wish to host the files, you can find them in the `<output-folder-path>/assets` directory generated by the indexer, or in the [releases](https://github.com/ang-zeyu/infisearch/releases) page.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Styling](./search_configuration_styling.md)
- [Indexer](./indexer_configuration.md)
- [Fields](./indexer/fields.md)
- [Files](./indexer/files.md)
- [Data](./indexer/files.md)
- [Miscellaneous](./indexer/misc.md)
- [Language](./language.md)
- [Search API](./search_api.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/src/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This page assumes the use case of a **static site**, that is:

There are a couple of options for installing the indexer:
- Install the global npm package with `npm install -g @infisearch/cli`.
- If you have the rust / cargo toolchains setup, run `cargo install infisearch --vers 0.9.1`.
- If you have the rust / cargo toolchains setup, run `cargo install infisearch --vers 0.10.0`.
- You can also grab the cli binaries [here](https://github.com/ang-zeyu/infisearch/releases).

## Running the indexer
Expand All @@ -46,12 +46,12 @@ If you are using the binaries, replace `infisearch` with the appropriate executa
### Installation via CDN

```html
<!-- Replace "v0.9.1" as appropriate -->
<!-- Replace "v0.10.0" as appropriate -->

<!-- Search UI script -->
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.9.1/packages/search-ui/dist/search-ui.ascii.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.10.0/packages/search-ui/dist/search-ui.ascii.bundle.js"></script>
<!-- Search UI css, this provides some basic styling for the search dropdown, and can be omitted if desired -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.9.1/packages/search-ui/dist/search-ui-light.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.10.0/packages/search-ui/dist/search-ui-light.css" />
```

> ⚠️ Ensure the linked versions **match the indexer version** used exactly.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/indexer/files.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Indexer File Configuration
# Indexer Data Configuration

The configurations in this section mainly specify **how** (mapping file contents to fields) and **which** files to index.
The configurations in this page specify **how** (mapping file data to fields) and **which** files to index.

InfiSearch's defaults should be sufficient to index most HTML files, but if not, you can also configure how the content mapping is done. Enabling support for other file formats (e.g. JSON, CSV, PDF) files is also done here.
InfiSearch's defaults are sufficient to index most HTML files, but if not, you can also configure how the content mapping is done. Enabling support for other file formats (e.g. JSON, CSV, PDF) files is also done here.

## Mapping File Data to Fields

Expand Down
69 changes: 26 additions & 43 deletions docs/src/indexer/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,35 @@

## Indexing Positions

**`with_positions = true`**

This option controls whether positions will be stored.
```json
{
"indexing_config": {
"with_positions": true
}
}
```

This option controls if positions are stored.
Features such as phrase queries that require positional information will not work if this is disabled.

Turning this off for very large collections (~> 1GB) can increase the tool's scalability, at the cost of such features.

## Indexer Performance
## Indexer Thread Count

```json
{
"indexing_config": {
"num_threads": <number of physical cpus> - 1
"num_threads": max(min(physical cores, logical cores) - 1, 1)
}
}
```

This is the number of threads to use, excluding the main thread. When unspecified, this is `max(min(num physical cores, num logical cores) - 1, 1)`.


## Indexing Multiple Files Under One Document

InfiSearch regards each file as a single document by default. You can index **multiple files** into **one document** using the reserved field [`_add_files`](./fields.md#reserved-fields). This is useful if you need to override or add data but can't modify the source document easily.

#### Example: Overriding a Document's Title
Overrides should be provided with JSON, CSV, or HTML files, as TXT and PDF files have no reliable way of supplying the `_add_files` field. In addition, you will need to manually map the CSV data to the `_add_files` field. This is automatically done for JSON and [HTML](../linking_to_others.md) files.

#### Example: Overriding a Document's Link With Another File

Suppose you have the following files:

Expand All @@ -37,18 +40,18 @@ folder
|-- overrides.json
```

To index `main.html` and override its title, you would have:
To index `main.html` and override its link, you would have:

1\) Inside `overrides.json`,
`overrides.json`

```json
{
"title": "Title Override",
"link": "https://infi-search.com",
"_add_files": "./main.html"
}
```

2\) Inside your indexer configuration file:
Indexer Configuration

```json
{
Expand All @@ -58,25 +61,11 @@ To index `main.html` and override its title, you would have:
}
```

This excludes indexing `main.html` directly, but does so through `overrides.json`. As the user interface uses the first title it sees, the title is overwritten.

#### Example: Overriding a Document's Link
Another example use case might be to redirect to another domain using the [`link` field](./fields.md#default-field-configuration):


```json
{
"link": "https://infi-search.com",
"_add_files": "./main.html"
}
```

> Overrides should be provided with JSON, CSV, or HTML files, as TXT and PDF files have no reliable way of supplying the `_add_files` field. In addition, you will need to manually map the CSV data to the `_add_files` field. This is automatically done for JSON and [HTML](../linking_to_others.md) files.
This excludes indexing `main.html` directly, but does so through `overrides.json`.

## Larger Collections

> ⚠️ This section is mostly for reference, use the preconfigured [scaling presets](../larger_collections.md) if possible.
> ⚠️ This section serves as a reference, prefer the preconfigured [scaling presets](../larger_collections.md) if possible.
**Field Configuration**

Expand All @@ -96,25 +85,19 @@ Another example use case might be to redirect to another domain using the [`link

#### Field Store Caching: **`cache_all_field_stores`**

This is the same option as the one under [search functionality options](../search_configuration.md#search-functionality-options).
If both are specified, the value specified in the `infisearch.init` takes priority.

All fields specified with `storage=[{ "type": "text" }]` are cached up front on initialisation when this is enabled.
All fields specified with `storage=[{ "type": "text" }]` are cached up front when this is enabled.
This is the same option as the one under [search functionality options](../search_configuration.md#search-functionality-options), and has lower priority.

#### Field Store Granularity: `num_docs_per_store`

The `num_docs_per_store` parameter controls how many documents to store in one JSON file. Batching multiple files together if the fields stored are small can lead to less files and better browser caching.
The `num_docs_per_store` parameter controls how many documents' texts to store in one JSON file. Batching multiple files together increases file size but can lead to less files and better browser caching.

#### Index Shard Size: **`pl_limit`**

This is the main threshold parameter (in bytes) at which to "cut" index (**pl** meaning [postings list](https://en.wikipedia.org/wiki/Inverted_index)) files.

Increasing this value produces less but bigger files (which may take longer to retrieve), and vice versa.

Increasing the value may also be useful for caching when used in conjunction with `pl_cache_threshold` below, since fewer index files will be produced.
This is a threshold (in bytes) at which to "cut" index (**pl** meaning [postings list](https://en.wikipedia.org/wiki/Inverted_index)) chunks.
Increasing this produces less but bigger chunks (which take longer to retrieve).

#### Index Caching: **`pl_cache_threshold`**

Index files that exceed this number will be cached by the search library at initilisation.

It can be used to configure InfiSearch for response time (over scalability) for some use cases. This is discussed in more detail in [Larger Collections](../larger_collections.md).
Index chunks that exceed this size (in bytes) are cached by the search library on initilisation.
It is used to configure InfiSearch for response time (over scalability) for typical use cases.
6 changes: 3 additions & 3 deletions docs/src/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The text is first split into on sentences, then whitespaces to obtain tokens. An
**CDN Link**

```html
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.9.1/packages/search-ui/dist/search-ui.ascii.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.10.0/packages/search-ui/dist/search-ui.ascii.bundle.js"></script>
```

## Ascii Tokenizer with Stemmer
Expand Down Expand Up @@ -66,7 +66,7 @@ If you do not need stemming, use the `ascii` tokenizer, which has a smaller wasm
**CDN Link**

```html
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.9.1/packages/search-ui/dist/search-ui.ascii-stemmer.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.10.0/packages/search-ui/dist/search-ui.ascii-stemmer.bundle.js"></script>
```

## Chinese Tokenizer
Expand All @@ -89,7 +89,7 @@ You are highly recommended to keep positions indexed and query term proximity ra
**CDN Link**

```html
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.9.1/packages/search-ui/dist/search-ui.chinese.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ang-zeyu/infisearch@v0.10.0/packages/search-ui/dist/search-ui.chinese.bundle.js"></script>
```

## Stop Words
Expand Down
Loading

0 comments on commit e2fed8f

Please sign in to comment.