# Bitwise, Elasticsearch outside of App Search, Runtime Fields, and search results

**URL:** <https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [September 8, 2021, 11:46pm UTC](https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716 "2021-09-08T23:46:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgetz-riskalyze](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgetz-riskalyze/32/94342_2.png) [@dgetz-riskalyze](https://discuss.elastic.co/u/dgetz-riskalyze)\
**Post date:** [September 8, 2021, 11:46pm UTC](https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716/1 "2021-09-08T23:46:23Z")

</div>

We are just getting started with App Search. I think the answer is no, but in case we are missing something....

1. Does App Search support bitwise comparisons? For example, could we store a bunch of values in one field as a bitmap and then do a bitwise comparison to see if a value exists?

2. App Search has a 64 field limit. Is it possible to add more fields to the underlying Elasticsearch index, but only have App Search use the 64 fields it knows about? For those other fields, we would hit Elasticsearch directly.

3. In Elasticsearch, you can have runtime fields that can be the result of a script. Does that functionality exist in App Search?

Also, when sorting by name, "ARM Holdings plc" comes up before "Aetna Inc". Does App Search sort an all capital word before proper cased words?

---

<div class="post-metadata">

**Author:** ![Scrilling](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scrilling/32/78663_2.png) [@Scrilling](https://discuss.elastic.co/u/Scrilling)\
**Post date:** [September 9, 2021, 5:15pm UTC](https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716/2 "2021-09-09T17:15:58Z")

</div>

Hi Dan,

You are correct that App Search does not support the 1st and 3rd cases you outlined. For case #2, the field limit is configurable in `enterprise-search.yml`.

```auto
# Configure how many fields an engine can have.
# NOTE: The Elasticsearch/Lucene setting `indices.query.bool.max_clause_count`
# might also need to be adjusted if "Max clause count exceeded" errors start
# occurring. See more here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-settings.html
#
#app_search.engine.total_fields.limit: 64

```

You do not want to directly modify the underlying Elasticsearch indices that power App Search; doing so will likely break App Search and cause issues for upgrading. I'm looking more into your question on sorting and will follow up shortly!

---

<div class="post-metadata">

**Author:** ![dgetz-riskalyze](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgetz-riskalyze/32/94342_2.png) [@dgetz-riskalyze](https://discuss.elastic.co/u/dgetz-riskalyze)\
**Post date:** [September 9, 2021, 5:45pm UTC](https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716/3 "2021-09-09T17:45:05Z")

</div>

Thanks! We were told that going above the 64 field limit could cause performance issues. Is that the case or was there a misunderstanding?

---

<div class="post-metadata">

**Author:** ![Scrilling](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scrilling/32/78663_2.png) [@Scrilling](https://discuss.elastic.co/u/Scrilling)\
**Post date:** [September 9, 2021, 6:21pm UTC](https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716/4 "2021-09-09T18:21:33Z")

</div>

Yes, raising that limit could impact performance negatively. If you decide to change that setting, I recommend profiling performance against some representative queries to see if any impact is within an acceptable range for your use case. You could also include tweaks in your cluster's configuration (RAM, etc.) in these experiments.

Regarding the question on sort, the raw value of the sort field is used for an alphanumeric sort. In practice, this means that capital letters will indeed sort before lowercase.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![dgetz-riskalyze](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgetz-riskalyze/32/94342_2.png) [@dgetz-riskalyze](https://discuss.elastic.co/u/dgetz-riskalyze)\
**Post date:** [September 9, 2021, 10:09pm UTC](https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716/5 "2021-09-09T22:09:59Z")

</div>

Thank you so much!

---

<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:** [October 7, 2021, 10:10pm UTC](https://discuss.elastic.co/t/bitwise-elasticsearch-outside-of-app-search-runtime-fields-and-search-results/283716/6 "2021-10-07T22:10:45Z")

</div>

Closed on October 7, 2021, 10:10pm UTC

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