Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDoc-2499_Corax-6.0-updates #1689

Merged
merged 15 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Indexes: Boosting

A feature that RavenDB leverages from Lucene is called Boosting. This feature gives you the ability to manually tune the relevance level of matching documents when performing a query.

From the index perspective we can associate to an index entry a boosting factor. The higher value it has, the more relevant term will be. To do this, we must use the `Boost` extension method from the `Raven.Client.Documents.Linq.Indexing` namespace.

Let's jump straight into the example. To perform the query that will return employees where either `FirstName` or `LastName` is equal to _Bob_, and to promote employees (move them to the top of the results) where `FirstName` matches the phrase, we must first create an index with boosted entry.

{CODE-TABS}
{CODE-TAB:csharp:AbstractIndexCreationTask boosting_2@Indexes\Boosting.cs /}
{CODE-TAB:csharp:Operation boosting_4@Indexes\Boosting.cs /}
{CODE-TABS/}

The next step is to perform a query against that index:

{CODE boosting_3@Indexes\Boosting.cs /}

## Remarks

{INFO Boosting is also available at the query level. You can read more about it [here](../client-api/session/querying/text-search/boost-search-results). /}

{NOTE: }
When using [Corax](../indexes/search-engine/corax) as the search engine:

* [indexing-time boosting](../indexes/search-engine/corax#supported-features)
is available for documents, but not for document fields.
* Corax ranks search results using the [BM25 algorithm](https://en.wikipedia.org/wiki/Okapi_BM25).
Other search engines, e.g. Lucene, may use a different ranking algorithm and return different search results.

{NOTE/}

## Related Articles

### Querying

- [Full-text search](../client-api/session/querying/text-search/full-text-search)
- [Boost search results](../client-api/session/querying/text-search/boost-search-results)

### Indexes

- [Analyzers](../indexes/using-analyzers)
- [Storing Data in Index](../indexes/storing-data-in-index)
- [Term Vectors](../indexes/using-term-vectors)
- [Dynamic Fields](../indexes/using-dynamic-fields)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Indexes: Boosting

A feature that RavenDB leverages from Lucene is called Boosting. This feature gives you the ability to manually tune the relevance level of matching documents when performing a query.

From the index perspective we can associate to an index entry a boosting factor. The higher value it has, the more relevant term will be. To do this, we must use the `Boost` method.

Let's jump straight into the example. To perform the query that will return employees where either `FirstName` or `LastName` is equal to _Bob_, and to promote employees (move them to the top of the results) where `FirstName` matches the phrase, we must first create an index with boosted entry.

{CODE-TABS}
{CODE-TAB:java:AbstractIndexCreationTask boosting_2@Indexes\Boosting.java /}
{CODE-TAB:java:Operation boosting_4@Indexes\Boosting.java /}
{CODE-TABS/}

The next step is to perform a query against that index:

{CODE:java boosting_3@Indexes\Boosting.java /}

## Remarks

{INFO Boosting is also available at the query level. /}

{NOTE: }
When using [Corax](../indexes/search-engine/corax) as the search engine:

* [indexing-time boosting](../indexes/search-engine/corax#supported-features)
is available for documents, but not for document fields.
* Corax ranks search results using the [BM25 algorithm](https://en.wikipedia.org/wiki/Okapi_BM25).
Other search engines, e.g. Lucene, may use a different ranking algorithm and return different search results.

{NOTE/}

## Related Articles

### Indexes

- [Analyzers](../indexes/using-analyzers)
- [Storing Data in Index](../indexes/storing-data-in-index)
- [Term Vectors](../indexes/using-term-vectors)
- [Dynamic Fields](../indexes/using-dynamic-fields)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Indexes: Boosting

A feature that RavenDB leverages from Lucene is called Boosting. This feature gives you the ability to manually tune the relevance level of matching documents when performing a query.

From the index perspective we can associate to an index entry a boosting factor. The higher value it has, the more relevant term will be. To do this, we must use the `Boost` method.

Let's jump straight into the example. To perform the query that will return employees where either `FirstName` or `LastName` is equal to _Bob_, and to promote employees (move them to the top of the results) where `FirstName` matches the phrase, we must first create an index with boosted entry.

{CODE-TABS}
{CODE-TAB:nodejs:AbstractIndexCreationTask boosting_2@indexes\boosting.js /}
{CODE-TAB:nodejs:Operation boosting_4@indexes\boosting.js /}
{CODE-TABS/}

The next step is to perform a query against that index:

{CODE:nodejs boosting_3@indexes\boosting.js /}

## Remarks

{INFO Boosting is also available at the query level. You can read more about it [here](../client-api/session/querying/text-search/boost-search-results). /}

{NOTE: }
When using [Corax](../indexes/search-engine/corax) as the search engine:

* [indexing-time boosting](../indexes/search-engine/corax#supported-features)
is available for documents, but not for document fields.
* Corax ranks search results using the [BM25 algorithm](https://en.wikipedia.org/wiki/Okapi_BM25).
Other search engines, e.g. Lucene, may use a different ranking algorithm and return different search results.

{NOTE/}

## Related Articles

### Querying

- [Full-text search](../client-api/session/querying/text-search/full-text-search)
- [Boost search results](../client-api/session/querying/text-search/boost-search-results)

### Indexes

- [Analyzers](../indexes/using-analyzers)
- [Storing Data in Index](../indexes/storing-data-in-index)
- [Term Vectors](../indexes/using-term-vectors)
- [Dynamic Fields](../indexes/using-dynamic-fields)
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
Paging, or pagination, is the process of splitting a dataset into pages, reading one page at a time. This is useful for optimizing bandwidth traffic and hardware usage or simply because no user can handle huge amounts of data at once.

{WARNING:Warning}
Starting from version 4.0, if the page size is not specified **on client side**, the server will assume **int.MaxValue** (2,147,483,647) and all the results will be downloaded. It is **recommended to set a page size explicitly** to avoid long response times caused by sending excessive amounts of data over the network or high memory consumption caused by handling large quantities of documents.
Starting from version 4.0, if the page size is not specified **on client side**, the server will assume `int.MaxValue` (2,147,483,647) and all the results will be downloaded. It is **recommended to set a page size explicitly** to avoid long response times caused by sending excessive amounts of data over the network or high memory consumption caused by handling large quantities of documents.
{WARNING/}

{INFO:Performance}
By default, if the number of returned results exceeds **2048**, the server will issue a `Performance Hint` notification (visible in the Studio) with information about query details. You can decide if this behavior is desired or not.
The threshold can be adjusted by changing the `PerformanceHints.MaxNumberOfResults` configuration value.
{INFO/}

{INFO:Limits}
When [Corax](../../indexes/search-engine/corax) is used as the search engine,
indexes of more than `int.MaxValue` (2,147,483,647) documents can be created and used.
To match this capacity, queries over Corax indexes can [skip](../../indexes/querying/paging#example-ii---basic-paging)
a number of results that exceeds `int.MaxValue` and `take` documents from
this location.
{INFO/}

## Example I - No Paging

The queries below will return all the results available.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
Paging, or pagination, is the process of splitting a dataset into pages, reading one page at a time. This is useful for optimizing bandwidth traffic and hardware usage or simply because no user can handle huge amounts of data at once.

{WARNING:Warning}
Starting from version 4.0, if the page size is not specified **on client side**, the server will assume **int.MaxValue** (2,147,483,647) and all the results will be downloaded. It is **recommended to set a page size explicitly** to avoid long response times caused by sending excessive amounts of data over the network or high memory consumption caused by handling large quantities of documents.
Starting from version 4.0, if the page size is not specified **on client side**, the server will assume `Integer.MAX_VALUE` (2,147,483,647) and all the results will be downloaded. It is **recommended to set a page size explicitly** to avoid long response times caused by sending excessive amounts of data over the network or high memory consumption caused by handling large quantities of documents.
{WARNING/}

{INFO:Performance}
By default, if the number of returned results exceeds **2048**, the server will issue a `Performance Hint` notification (visible in the Studio) with information about query details. You can decide if this behavior is desired or not.
The threshold can be adjusted by changing the `PerformanceHints.MaxNumberOfResults` configuration value.
{INFO/}

{INFO:Limits}
When [Corax](../../indexes/search-engine/corax) is used as the search engine,
indexes of more than `Integer.MAX_VALUE` (2,147,483,647) documents can be created and used.
To match this capacity, queries over Corax indexes can [skip](../../indexes/querying/paging#example-ii---basic-paging)
a number of results that exceeds `Integer.MAX_VALUE` and `take` documents from
this location.
{INFO/}

## Example I - No Paging

The queries below will return all the results available.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
Paging, or pagination, is the process of splitting a dataset into pages, reading one page at a time. This is useful for optimizing bandwidth traffic and hardware usage or simply because no user can handle huge amounts of data at once.

{WARNING:Warning}
Starting from version 4.0, if the page size is not specified **on client side**, the server will assume **int.MaxValue** (2,147,483,647) and all the results will be downloaded. It is **recommended to set a page size explicitly** to avoid long response times caused by sending excessive amounts of data over the network or high memory consumption caused by handling large quantities of documents.
Starting from version 4.0, if the page size is not specified **on client side**, the server will assume `Integer.MAX_VALUE` (2,147,483,647) and all the results will be downloaded. It is **recommended to set a page size explicitly** to avoid long response times caused by sending excessive amounts of data over the network or high memory consumption caused by handling large quantities of documents.
{WARNING/}

{INFO:Performance}
By default, if the number of returned results exceeds **2048**, the server will issue a `Performance Hint` notification (visible in the Studio) with information about query details. You can decide if this behavior is desired or not.
The threshold can be adjusted by changing the `PerformanceHints.MaxNumberOfResults` configuration value.
{INFO/}

{INFO:Limits}
When [Corax](../../indexes/search-engine/corax) is used as the search engine,
indexes of more than `Integer.MAX_VALUE` (2,147,483,647) documents can be created and used.
To match this capacity, queries over Corax indexes can [skip](../../indexes/querying/paging#example-ii---basic-paging)
a number of results that exceeds `Integer.MAX_VALUE` and `take` documents from
this location.
{INFO/}

## Example I - No Paging

The queries below will return all the results available.
Expand Down
Loading
Loading