In addition to the basic fields, Sooqr support user configured fields for additional data storage. By default, the Search API returns all fields that are available for a specific result. Depending on the number of fields, this can result in large result sets. Most of the time, you only need a few fields for displaying information to the user.

Specifying fields

You can use the fl option to specify which fields should be included in the response. You can specify fields in two formats:



Field aliases

Sooqr returns fields as it writes them in the database. Sometimes you need a field to be named different. For example, when connecting the API directly to a different API. You can use field aliassing to change the returned field name:


This will return the default field title as h1. It can be combined with normal fields:


Fields can be used only once. You cannot return both an aliased version of the field and the normal value. For example, this won't work:


This will result in a field called h2. The h1 field is never returned.