# AWS open search 1.2 IN operator is not working

**URL:** <https://forum.opensearch.org/t/aws-open-search-1-2-in-operator-is-not-working/17847>\
**Category:** OpenSearch\
**Tags:** troubleshoot\
**Created:** [February 10, 2024, 5:07pm UTC](https://forum.opensearch.org/t/aws-open-search-1-2-in-operator-is-not-working/17847 "2024-02-10T17:07:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajkumarjayavel](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rajkumarjayavel](https://forum.opensearch.org/u/rajkumarjayavel)\
**Post date:** [February 10, 2024, 5:07pm UTC](https://forum.opensearch.org/t/aws-open-search-1-2-in-operator-is-not-working/17847/1 "2024-02-10T17:07:40Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):

**Describe the issue** :

i am using the IN operator in text field with multiple conditions as given below. if am using the equal operator is it returning the result but if am trying with in operator it is not working

NOT WORKING  
SELECT merchant\_id FROM inventory where merchant\_id IN (‘123’) and (txn\_id like ‘%COM%’ or (match(search\_param,‘COM’,operator=‘and’) or search\_param like ‘%COM%’))

working without IN operator:  
SELECT merchant\_id FROM inventory where merchant\_id = ‘123’ and (txn\_id like ‘%COM%’ or (match(search\_param,‘COM’,operator=‘and’) or search\_param like ‘%COM%’))

**Configuration** :

**Relevant Logs or Screenshots** :  
{\n "reason": "Invalid SQL query",\n "details": "syntax error, expect AGAINST, actual OR",\n "type": "ParserException"\n },\n "status": 400\n}

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [February 29, 2024, 4:31pm UTC](https://forum.opensearch.org/t/aws-open-search-1-2-in-operator-is-not-working/17847/2 "2024-02-29T16:31:56Z")

</div>

@rajkumarjayavel I’ve just tested IN with OpenSearch 1.2 and had no issues

```auto
select * from security-auditlog-2024.02.29 where audit_format_version IN ('4')

```

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/a/af27b36c3f9bae9087a7ebf93814c586793e7f5c.png)

If you’re reporting an issue with AWS OpenSearch managed service I would suggest contacting AWS support.
