# Creating a CURL POST query against an App Search Meta Engine

**URL:** <https://discuss.elastic.co/t/creating-a-curl-post-query-against-an-app-search-meta-engine/327462>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [March 10, 2023, 3:37pm UTC](https://discuss.elastic.co/t/creating-a-curl-post-query-against-an-app-search-meta-engine/327462 "2023-03-10T15:37:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alongaks](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@alongaks](https://discuss.elastic.co/u/alongaks)\
**Post date:** [March 10, 2023, 3:37pm UTC](https://discuss.elastic.co/t/creating-a-curl-post-query-against-an-app-search-meta-engine/327462/1 "2023-03-10T15:37:01Z")

</div>

Hello,

A little background of this topic.

We are currently using SharePoint Search for crawling/indexing our web presence to create a website search experience on our site. Part of the functionality of SharePoint search provides "result sources". These provide for a, say, 'secondary' search field on a web page that allows a user to search for content only in that [www.mydomain.com/page/](http://www.mydomain.com/page/) subdirectory. While at the same time, in the page header there is still the 'global' domain site search functionality.

A snip of this current functionality is attached.

 ![search_snip](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4b45b510fb53634bee7bf8dca6b5a673237c372d.png)

Question:  
We are using an Elastic Cloud deployment to replace the SharePoint Search appliance. Leveraging an App Search 'meta engine', is it possible to create an experience like above?

The below, standard CURL query works as a 'global' search starter, works fine:

```auto
curl -X POST 'https://deployment.ent.us-east-1.aws.elastic-cloud.com/api/as/v1/engines/meta-engine/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-hashed' \
-d '{"query": "text", page: { size: 2 }}'

```

To add the secondary search field to the page, I was reviewing documentation/Googling to add in a 'wildcard' field(?) for the URL to search in just that subdirectory. However, I don't think I am doing it properly. Full disclosure: I'm not a web dev and constructing this is new for me! Be gentle. 🙂

```auto
curl -X POST 'https://deployment.ent.us-east-1.aws.elastic-cloud.com/api/as/v1/engines/meta-engine/search' -H 'Content-Type: application/json' -H 'Authorization: Bearer search-hashed' -d '{
  "query": "text",
  "filters": {
    "any": [
      "type": "wildcard",
      "field": "url",
      "value": [
        "https://www.mydomain.com/page/*"
      ]
    }
  ]
}'

```

---

<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:** [April 7, 2023, 3:37pm UTC](https://discuss.elastic.co/t/creating-a-curl-post-query-against-an-app-search-meta-engine/327462/2 "2023-04-07T15:37:18Z")

</div>

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