BaseSearchParams

algoliasearch.search.BaseSearchParams
case class BaseSearchParams(query: Option[String], similarQuery: Option[String], filters: Option[String], facetFilters: Option[FacetFilters], optionalFilters: Option[OptionalFilters], numericFilters: Option[NumericFilters], tagFilters: Option[TagFilters], sumOrFiltersScores: Option[Boolean], restrictSearchableAttributes: Option[Seq[String]], facets: Option[Seq[String]], facetingAfterDistinct: Option[Boolean], page: Option[Int], offset: Option[Int], length: Option[Int], aroundLatLng: Option[String], aroundLatLngViaIP: Option[Boolean], aroundRadius: Option[AroundRadius], aroundPrecision: Option[AroundPrecision], minimumAroundRadius: Option[Int], insideBoundingBox: Option[Seq[Seq[Double]]], insidePolygon: Option[Seq[Seq[Double]]], naturalLanguages: Option[Seq[SupportedLanguage]], ruleContexts: Option[Seq[String]], personalizationImpact: Option[Int], userToken: Option[String], getRankingInfo: Option[Boolean], synonyms: Option[Boolean], clickAnalytics: Option[Boolean], analytics: Option[Boolean], analyticsTags: Option[Seq[String]], percentileComputation: Option[Boolean], enableABTest: Option[Boolean])

BaseSearchParams

Value parameters

analytics

Whether this search will be included in Analytics.

analyticsTags

Tags to apply to the query for segmenting analytics data.

aroundLatLng

Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the aroundRadius and minimumAroundRadius settings. This parameter is ignored if you also specify insidePolygon or insideBoundingBox.

aroundLatLngViaIP

Whether to obtain the coordinates from the request's IP address.

clickAnalytics

Whether to include a queryID attribute in the response. The query ID is a unique identifier for a search query and is required for tracking click and conversion events.

enableABTest

Whether to enable A/B testing for this search.

facetingAfterDistinct

Whether faceting should be applied after deduplication with distinct. This leads to accurate facet counts when using faceting in combination with distinct. It's usually better to use afterDistinct modifiers in the attributesForFaceting setting, as facetingAfterDistinct only computes correct facet counts if all records have the same facet values for the attributeForDistinct.

facets

Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character *. For more information, see facets.

filters

Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - Numeric filters. <facet> <op> <number>, where <op> is one of <, <=, =, !=, >, >=. - Ranges. <facet>:<lower> TO <upper> where <lower> and <upper> are the lower and upper limits of the range (inclusive). - Facet filters. <facet>:<value> where <facet> is a facet attribute (case-sensitive) and <value> a facet value. - Tag filters. _tags:<value> or just <value> (case-sensitive). - Boolean filters. <facet>: true | false. You can combine filters with AND, OR, and NOT operators with the following restrictions: - You can only combine filters of the same type with OR. Not supported: facet:value OR num > 3. - You can't use NOT with combinations of filters. Not supported: NOT(facet:value OR facet:value) - You can't combine conjunctions (AND) with OR. Not supported: facet:value OR (facet:value AND facet:value) Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (OR, AND, NOT), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see Filters.

getRankingInfo

Whether the search response should include detailed ranking information.

insideBoundingBox

Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: [p1 lat, p1 long, p2 lat, p2 long]. Provide multiple bounding boxes as nested arrays. For more information, see rectangular area.

insidePolygon

Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see filtering inside polygons. This parameter is ignored if you also specify insideBoundingBox.

length

Number of hits to retrieve (used in combination with offset).

minimumAroundRadius

Minimum radius (in meters) for a search around a location when aroundRadius isn't set.

naturalLanguages

ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets removeStopWords and ignorePlurals to the list of provided languages. - Sets removeWordsIfNoResults to allOptional. - Adds a natural_language attribute to ruleContexts and analyticsTags.

offset

Position of the first hit to retrieve.

page

Page of search results to retrieve.

percentileComputation

Whether to include this search when calculating processing-time percentiles.

personalizationImpact

Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see Understanding Personalization impact.

query

Search query.

restrictSearchableAttributes

Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.

ruleContexts

Assigns a rule context to the search query. Rule contexts are strings that you can use to trigger matching rules.

similarQuery

Keywords to be used instead of the search query to conduct a more broader search. Using the similarQuery parameter changes other settings: - queryType is set to prefixNone. - removeStopWords is set to true. - words is set as the first ranking criterion. - All remaining words are treated as optionalWords. Since the similarQuery is supposed to do a broad search, they usually return many results. Combine it with filters to narrow down the list of results.

sumOrFiltersScores

Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see filter scores.

synonyms

Whether to take into account an index's synonyms for this search.

userToken

Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see user token.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product