Skip to main content
New Participant
Nov 12, 2026 8:32 PM UTC
Question

Smart Search Query Size Limitations

Hi everyone,

We're experiencing query-size issues when using Smart Search across multiple fields, including nested related record fields, on a dataset of approximately 66,000 records.

The queries execute successfully without Smart Search, but certain Smart Search queries exceed Appian's maximum response size.

Error:

APNX-3-1000-0B1: Query response size (114376770 bytes) exceeded max allowed (15728640 bytes)

We've tested both a!recordData() inside of a grid using the smart search parameters and a!queryRecordType() outside of a grid using a!smartSearch, and the issue occurs with both approaches. Reducing the number of fields retrieved helps avoid the error in some cases, but this limits the data we can display.

We understand that Smart Search increases the query response size, particularly when searching nested related record fields.

Our main question is why Smart Search causes such a significant increase in the amount of data returned compared to the same query without Smart Search. Is Smart Search retrieving additional data from related records beyond the fields explicitly requested, or is there something else contributing to the increased response size?

Additionally, are there recommended ways to reduce this overhead without limiting the searchable fields or the data returned in the results?

Example query:


a!queryRecordType(
  recordType: 'recordType!Record',
  filters: a!queryLogicalExpression(
    operator: "AND",
    logicalExpressions: {
      a!queryLogicalExpression(
        operator: "OR",
        filters: {
          a!smartSearch(
            searchField: 'recordType!Record.relationships.relationship1.fields.field1',
            searchType: "semantic search",
            searchTerms: "a"
          ),
          a!smartSearch(
            searchField: 'recordType!Record.relationships.relationship2.fields.field1',
            searchType: "semantic search",
            searchTerms: "a"
          ),
          a!smartSearch(
            searchField: 'recordType!Record.relationships.relationship3.relationships.relationship4.fields.field1',
            searchType: "semantic search",
            searchTerms: "a"
          )
        }
      )
    }
  ),
  fields: {
    'recordType!Record.fields.field1',
    'recordType!Record.fields.field2',
    'recordType!Record.relationships.relationship1.fields.field1',
    'recordType!Record.relationships.relationship2.fields.field1',
    'recordType!Record.relationships.relationship3.relationships.relationship4.fields.field1',
    'recordType!Record.relationships.relationship5.relationships.relationship6.fields.field1',
    'recordType!Record.searchResults.allSearchFields'
  },
  pagingInfo: local!pagingInfo,
  fetchTotalCount: true
)
 

8 replies

mathieud0001
Genius
Nov 12, 2026 9:55 PM UTC

Couple of things it could be but do you need to return the smart search metadata?

'recordType!Record.searchResults.allSearchFields'

 

New Participant
Nov 12, 2026 10:17 PM UTC

Thanks for pointing that out! Your comment actually made me realize I left out an important detail in my original post.

The query size issue occurs when sorting the Smart Search results by Match Quality (similarityScore). The query can execute successfully with Smart Search enabled, but sorting by similarityScore causes it to exceed the maximum response size.

As for allSearchFields, we're using that metadata to identify which fields matched the search.

mathieud0001
Genius
Nov 12, 2026 10:56 PM UTC

Do you need really need source content? Did you try using only these fields?

'recordType!Record.searchResults.sourceField'
'recordType!Record.searchResults.similarityCore'

 

New Participant
Nov 12, 2026 10:16 PM UTC

I wanted to clarify an important detail I left out of my original post.

The issue only occurs when sorting Smart Search results by Match Quality (similarityScore), rather than simply executing the query with Smart Search enabled.

Certain queries execute successfully with Smart Search, but sorting the results by similarityScore causes the query to exceed Appian's maximum response size.