# App-search with data feed from dataset/index

**URL:** <https://discuss.elastic.co/t/app-search-with-data-feed-from-dataset-index/307410>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [June 16, 2022, 1:13pm UTC](https://discuss.elastic.co/t/app-search-with-data-feed-from-dataset-index/307410 "2022-06-16T13:13:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![frolko](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@frolko](https://discuss.elastic.co/u/frolko)\
**Post date:** [June 16, 2022, 1:13pm UTC](https://discuss.elastic.co/t/app-search-with-data-feed-from-dataset-index/307410/1 "2022-06-16T13:13:37Z")

</div>

Running ECK 8.2

The idea is to use data in elasticsearch using e.g. filebeat httpjson to load elasticsearch with data/dataset/index.

The question is, how to use this data for app-search?

New to elasticsearch / app search and feels strange that this is so "disconnected". Using that that already exists would speed up or simplify a lot, and "it's the same product". Should be able to link the data and if a reindex is needed some kind of event might be used?

Found some posts but no solution.

> [@Is it possible to query app-search documents through elastic search API?](https://discuss.elastic.co/t/is-it-possible-to-query-app-search-documents-through-elastic-search-api/246370):
>
> I have self-hosted app search instance with the Elastic stack (ELK+Appsearch). I can't see app-search index in Kibana. I'm wondering if there is any other way to manage the documents app-search is working on apart from app-search API? Can I use Logstash to keep app-search documents in sync with my SQL Server database?

> [@Can you hook an existing Elasticsearch index to Elastic App search](https://discuss.elastic.co/t/can-you-hook-an-existing-elasticsearch-index-to-elastic-app-search/222508):
>
> I want to integrate App Search in my project. App search runs fine out of the box. But I have an application that is running on Elasticsearch, I was wondering if I could use this existing index as a backend for App search? If No, is it because documents are indexed differently for App Search engine compared to Elasticsearch? Also, why can't I access App search documents from my elasticsearch cluster (localhost:9200)?

---

<div class="post-metadata">

**Author:** ![maryna.cherniavska](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maryna.cherniavska/32/89935_2.png) [@maryna.cherniavska](https://discuss.elastic.co/u/maryna.cherniavska)\
**Post date:** [June 16, 2022, 2:27pm UTC](https://discuss.elastic.co/t/app-search-with-data-feed-from-dataset-index/307410/2 "2022-06-16T14:27:34Z")

</div>

Hi @frolko, I am happy to say that what you want is now already possible, albeit as a Technical Preview feature. You can read more about it in our documentation:

> **[Elasticsearch index engines (technical preview) | Elastic App Search...](https://www.elastic.co/guide/en/app-search/current/elasticsearch-engines.html)**

Also, this guide about using Elasticsearch search API instead of the Search API that's part of App Search might be of use:

> **[Elasticsearch search for App Search Guide | Elastic App Search Documentation...](https://www.elastic.co/guide/en/app-search/current/elasticsearch-search-guide.html)**

Hope that helps!

---

<div class="post-metadata">

**Author:** ![frolko](https://avatars.discourse-cdn.com/v4/letter/f/50afbb/32.png) [@frolko](https://discuss.elastic.co/u/frolko)\
**Post date:** [June 20, 2022, 11:36am UTC](https://discuss.elastic.co/t/app-search-with-data-feed-from-dataset-index/307410/3 "2022-06-20T11:36:43Z")

</div>

Thanks. Must be something I'm missing.

I've created a http json with pagination called 'accounts'. And it goes thru a pipeline reformat the data to match search needs (e.g. 'accountType' is renamed 'account\_type')

Automatically these are created

- data stream: logs-accounts-default
- indices: .ds-logs-accounts-default-2022.06.20-000001

Now somehow to get the indecies to be named 'search-' as a start.  
If I run `PUT .ds-logs-accounts-default-2022.06.20-000001/_alias/search-accounts` I get the error

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "The provided expressions [.ds-logs-accounts-default-2022.06.20-000001] match a backing index belonging to data stream [logs-accounts-default]. Data stream backing indices don't support aliases."
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "The provided expressions [.ds-logs-accounts-default-2022.06.20-000001] match a backing index belonging to data stream [logs-accounts-default]. Data stream backing indices don't support aliases."
  },
  "status" : 400
}

```

Testing the data stream 'PUT logs-accounts-default/\_alias/search-accounts' works but is not selectable when trying to create 'app search engine'

---

<div class="post-metadata">

**Author:** ![maryna.cherniavska](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maryna.cherniavska/32/89935_2.png) [@maryna.cherniavska](https://discuss.elastic.co/u/maryna.cherniavska)\
**Post date:** [June 27, 2022, 9:55am UTC](https://discuss.elastic.co/t/app-search-with-data-feed-from-dataset-index/307410/4 "2022-06-27T09:55:28Z")

</div>

Hi @frolko.

So the basic requirements are as follows:

1. alias should start with `search-` prefix
2. user should have permissions for that index and alias
3. user needs to expand “advanced settings” when adding an engine to see this option
4. the feature is only available in 8.2+

I tried to reproduce the situation in the following way:

1. Created a simple index called `my_index` on Enterprise Search 8.2
2. Indexed a few documents into it
3. Created an alias called `search-test`
4. Used the `Advanced` options to create an engine using that alias

 ![Screenshot 2022-06-27 at 11.22.31](https://us1.discourse-cdn.com/elastic/original/3X/6/9/690ed18ca5db714a6c0076ea578aee2d1bdc7b59.png)

It worked. An engine was created.  
I think that what's different in your setup is the fact that your alias points to the data stream, and not an index. And the underlying index can't be aliased because it's just not supported.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 25, 2022, 9:56am UTC](https://discuss.elastic.co/t/app-search-with-data-feed-from-dataset-index/307410/5 "2022-07-25T09:56:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
