# Possible for users to specify logical operators (OR. AND) in a field applied to a query?

**URL:** <https://discuss.elastic.co/t/possible-for-users-to-specify-logical-operators-or-and-in-a-field-applied-to-a-query/288926>\
**Category:** Elasticsearch\
**Created:** [November 10, 2021, 8:14pm UTC](https://discuss.elastic.co/t/possible-for-users-to-specify-logical-operators-or-and-in-a-field-applied-to-a-query/288926 "2021-11-10T20:14:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JP\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jp_b/32/96982_2.png) [@JP\_B](https://discuss.elastic.co/u/JP_B)\
**Post date:** [November 10, 2021, 8:14pm UTC](https://discuss.elastic.co/t/possible-for-users-to-specify-logical-operators-or-and-in-a-field-applied-to-a-query/288926/1 "2021-11-10T20:14:25Z")

</div>

I’m building an app to search scientific documents. The abstract from such articles is indexed as a text field. A web front end has input text field to specify keywords which are used in a match query with standard analyzer to find best documents.

It may be that some users such to specify logical operators in the text field, e.g. (vaccine AND protein) OR pandemic.

Is there any standard feature to understand presence of these operators in the user specified search term with Elasticsearch so I don’t need to do the parsing myself?

Appreciate any guidance

---

<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:** [December 8, 2021, 8:14pm UTC](https://discuss.elastic.co/t/possible-for-users-to-specify-logical-operators-or-and-in-a-field-applied-to-a-query/288926/2 "2021-12-08T20:14:40Z")

</div>

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