# Why results from a simple search and a batch search can be slightly different?

If you search "Shakespeare" in the search bar and if you run a query containing "Shakespeare" in a batch search, you can get slightly different documents between the two results.

Why?

For technical reasons, Datashare processes both queries in 2 different ways:

**a. Search bar (a simple search processed in the browser):**

The search query sent to Elasticsearch is processed in your browser by Datashare's client. It is then sent to Elasticsearch through Datashare server which forwards your query.

**b. Batch search (several searches processed by the server):**

1. Datashare's server processes each of the batch search's queries
2. Each query is sent to Elasticsearch. The results are saved into a database
3. When the batch search is finished, you get the results from Datashare
4. Datashare sends back the results stored into the database/

Datashare's team attempts to make both results be similar, but slight differences can happen between the two queries.

<figure><img src="/files/-MZrTDmfM5DEKq0xTIT4" alt="A diagram with the title &#x27;Query from navigator&#x27;"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://icij.gitbook.io/datashare/usage/faq/general/why-results-from-a-simple-search-and-a-batch-search-can-be-sligthly-different.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
