com.algolia.search.models.indexing.SearchParameters Maven / Gradle / Ivy
The newest version!
package com.algolia.search.models.indexing;
import com.algolia.search.models.settings.Distinct;
import com.algolia.search.models.settings.IgnorePlurals;
import com.algolia.search.models.settings.RemoveStopWords;
import com.algolia.search.models.settings.TypoTolerance;
import com.algolia.search.util.QueryStringUtils;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class SearchParameters> implements Serializable {
/** To prevent unchecked cast warning. */
@JsonIgnore
public abstract T getThis();
public String getQuery() {
return query;
}
public T setQuery(String query) {
this.query = query;
return getThis();
}
public String getSimilarQuery() {
return similarQuery;
}
public T setSimilarQuery(String similarQuery) {
this.similarQuery = similarQuery;
return getThis();
}
public Boolean getGetRankingInfo() {
return getRankingInfo;
}
public T setGetRankingInfo(Boolean getRankingInfo) {
this.getRankingInfo = getRankingInfo;
return getThis();
}
public List getExplain() {
return explain;
}
public T setExplain(List explain) {
this.explain = explain;
return getThis();
}
public List getNaturalLanguages() {
return naturalLanguages;
}
public T setNaturalLanguages(List naturalLanguages) {
this.naturalLanguages = naturalLanguages;
return getThis();
}
public List> getNumericFilters() {
return numericFilters;
}
public T setNumericFilters(List> numericFilters) {
this.numericFilters = numericFilters;
return getThis();
}
public List> getTagFilters() {
return tagFilters;
}
public T setTagFilters(List> tagFilters) {
this.tagFilters = tagFilters;
return getThis();
}
public Boolean getClickAnalytics() {
return clickAnalytics;
}
public T setClickAnalytics(Boolean clickAnalytics) {
this.clickAnalytics = clickAnalytics;
return getThis();
}
public Boolean getAnalytics() {
return analytics;
}
public T setAnalytics(Boolean analytics) {
this.analytics = analytics;
return getThis();
}
public List getAnalyticsTags() {
return analyticsTags;
}
public T setAnalyticsTags(List analyticsTags) {
this.analyticsTags = analyticsTags;
return getThis();
}
public Boolean getSynonyms() {
return synonyms;
}
public T setSynonyms(Boolean synonyms) {
this.synonyms = synonyms;
return getThis();
}
public Boolean getReplaceSynonymsInHighlight() {
return replaceSynonymsInHighlight;
}
public T setReplaceSynonymsInHighlight(Boolean replaceSynonymsInHighlight) {
this.replaceSynonymsInHighlight = replaceSynonymsInHighlight;
return getThis();
}
public Integer getMinProximity() {
return minProximity;
}
public T setMinProximity(Integer minProximity) {
this.minProximity = minProximity;
return getThis();
}
public List getResponseFields() {
return responseFields;
}
public T setResponseFields(List responseFields) {
this.responseFields = responseFields;
return getThis();
}
public Long getMaxFacetHits() {
return maxFacetHits;
}
public T setMaxFacetHits(Long maxFacetHits) {
this.maxFacetHits = maxFacetHits;
return getThis();
}
public Boolean getPercentileComputation() {
return percentileComputation;
}
public T setPercentileComputation(Boolean percentileComputation) {
this.percentileComputation = percentileComputation;
return getThis();
}
public List getQueryLanguages() {
return queryLanguages;
}
public T setQueryLanguages(List queryLanguages) {
this.queryLanguages = queryLanguages;
return getThis();
}
public List getAttributesToRetrieve() {
return attributesToRetrieve;
}
public T setAttributesToRetrieve(List attributesToRetrieve) {
this.attributesToRetrieve = attributesToRetrieve;
return getThis();
}
public List getRestrictSearchableAttributes() {
return restrictSearchableAttributes;
}
public T setRestrictSearchableAttributes(List restrictSearchableAttributes) {
this.restrictSearchableAttributes = restrictSearchableAttributes;
return getThis();
}
public String getFilters() {
return filters;
}
public T setFilters(String filters) {
this.filters = filters;
return getThis();
}
public List getFacets() {
return facets;
}
public T setFacets(List facets) {
this.facets = facets;
return getThis();
}
public Long getMaxValuesPerFacet() {
return maxValuesPerFacet;
}
public T setMaxValuesPerFacet(Long maxValuesPerFacet) {
this.maxValuesPerFacet = maxValuesPerFacet;
return getThis();
}
public Boolean getFacetingAfterDistinct() {
return facetingAfterDistinct;
}
public T setFacetingAfterDistinct(Boolean facetingAfterDistinct) {
this.facetingAfterDistinct = facetingAfterDistinct;
return getThis();
}
public String getSortFacetValuesBy() {
return sortFacetValuesBy;
}
public T setSortFacetValuesBy(String sortFacetValuesBy) {
this.sortFacetValuesBy = sortFacetValuesBy;
return getThis();
}
public String getAroundLatLng() {
return aroundLatLng;
}
public T setAroundLatLng(String aroundLatLng) {
this.aroundLatLng = aroundLatLng;
return getThis();
}
public Boolean getAroundLatLngViaIP() {
return aroundLatLngViaIP;
}
public T setAroundLatLngViaIP(Boolean aroundLatLngViaIP) {
this.aroundLatLngViaIP = aroundLatLngViaIP;
return getThis();
}
public List getAroundPrecision() {
return aroundPrecision;
}
public T setAroundPrecision(List aroundPrecision) {
this.aroundPrecision = aroundPrecision;
return getThis();
}
public Integer getMinimumAroundRadius() {
return minimumAroundRadius;
}
public T setMinimumAroundRadius(Integer minimumAroundRadius) {
this.minimumAroundRadius = minimumAroundRadius;
return getThis();
}
public List> getInsideBoundingBox() {
return insideBoundingBox;
}
public T setInsideBoundingBox(List> insideBoundingBox) {
this.insideBoundingBox = insideBoundingBox;
return getThis();
}
public List> getInsidePolygon() {
return insidePolygon;
}
public T setInsidePolygon(List> insidePolygon) {
this.insidePolygon = insidePolygon;
return getThis();
}
public List getAttributesToHighlight() {
return attributesToHighlight;
}
public T setAttributesToHighlight(List attributesToHighlight) {
this.attributesToHighlight = attributesToHighlight;
return getThis();
}
public List getAttributesToSnippet() {
return attributesToSnippet;
}
public T setAttributesToSnippet(List attributesToSnippet) {
this.attributesToSnippet = attributesToSnippet;
return getThis();
}
public String getHighlightPreTag() {
return highlightPreTag;
}
public T setHighlightPreTag(String highlightPreTag) {
this.highlightPreTag = highlightPreTag;
return getThis();
}
public String getHighlightPostTag() {
return highlightPostTag;
}
public T setHighlightPostTag(String highlightPostTag) {
this.highlightPostTag = highlightPostTag;
return getThis();
}
public String getSnippetEllipsisText() {
return snippetEllipsisText;
}
public T setSnippetEllipsisText(String snippetEllipsisText) {
this.snippetEllipsisText = snippetEllipsisText;
return getThis();
}
public Boolean getRestrictHighlightAndSnippetArrays() {
return restrictHighlightAndSnippetArrays;
}
public T setRestrictHighlightAndSnippetArrays(Boolean restrictHighlightAndSnippetArrays) {
this.restrictHighlightAndSnippetArrays = restrictHighlightAndSnippetArrays;
return getThis();
}
public Integer getPage() {
return page;
}
public T setPage(Integer page) {
this.page = page;
return getThis();
}
public Integer getHitsPerPage() {
return hitsPerPage;
}
public T setHitsPerPage(Integer hitsPerPage) {
this.hitsPerPage = hitsPerPage;
return getThis();
}
public Integer getOffset() {
return offset;
}
public T setOffset(Integer offset) {
this.offset = offset;
return getThis();
}
public Integer getLength() {
return length;
}
public T setLength(Integer length) {
this.length = length;
return getThis();
}
public Boolean getEnableRules() {
return enableRules;
}
public T setEnableRules(Boolean enableRules) {
this.enableRules = enableRules;
return getThis();
}
public List getRuleContexts() {
return ruleContexts;
}
public T setRuleContexts(List ruleContexts) {
this.ruleContexts = ruleContexts;
return getThis();
}
public String getQueryType() {
return queryType;
}
public T setQueryType(String queryType) {
this.queryType = queryType;
return getThis();
}
public Boolean getAdvancedSyntax() {
return advancedSyntax;
}
public T setAdvancedSyntax(Boolean advancedSyntax) {
this.advancedSyntax = advancedSyntax;
return getThis();
}
public List getAdvancedSyntaxFeatures() {
return advancedSyntaxFeatures;
}
public T setAdvancedSyntaxFeatures(List advancedSyntaxFeatures) {
this.advancedSyntaxFeatures = advancedSyntaxFeatures;
return getThis();
}
public List getOptionalWords() {
return optionalWords;
}
public T setOptionalWords(List optionalWords) {
this.optionalWords = optionalWords;
return getThis();
}
public List getDisableExactOnAttributes() {
return disableExactOnAttributes;
}
public T setDisableExactOnAttributes(List disableExactOnAttributes) {
this.disableExactOnAttributes = disableExactOnAttributes;
return getThis();
}
public String getExactOnSingleWordQuery() {
return exactOnSingleWordQuery;
}
public T setExactOnSingleWordQuery(String exactOnSingleWordQuery) {
this.exactOnSingleWordQuery = exactOnSingleWordQuery;
return getThis();
}
public List getAlternativesAsExact() {
return alternativesAsExact;
}
public T setAlternativesAsExact(List alternativesAsExact) {
this.alternativesAsExact = alternativesAsExact;
return getThis();
}
public Integer getMinWordSizefor1Typo() {
return minWordSizefor1Typo;
}
public T setMinWordSizefor1Typo(Integer minWordSizefor1Typo) {
this.minWordSizefor1Typo = minWordSizefor1Typo;
return getThis();
}
public Integer getMinWordSizefor2Typos() {
return minWordSizefor2Typos;
}
public T setMinWordSizefor2Typos(Integer minWordSizefor2Typos) {
this.minWordSizefor2Typos = minWordSizefor2Typos;
return getThis();
}
public Boolean getAllowTyposOnNumericTokens() {
return allowTyposOnNumericTokens;
}
public T setAllowTyposOnNumericTokens(Boolean allowTyposOnNumericTokens) {
this.allowTyposOnNumericTokens = allowTyposOnNumericTokens;
return getThis();
}
public List getDisableTypoToleranceOnAttributes() {
return disableTypoToleranceOnAttributes;
}
public T setDisableTypoToleranceOnAttributes(List disableTypoToleranceOnAttributes) {
this.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes;
return getThis();
}
public String getUserToken() {
return userToken;
}
public T setUserToken(String userToken) {
this.userToken = userToken;
return getThis();
}
public Integer getValidUntil() {
return validUntil;
}
public T setValidUntil(Integer validUntil) {
this.validUntil = validUntil;
return getThis();
}
public List getRestrictIndices() {
return restrictIndices;
}
public T setRestrictIndices(List restrictIndices) {
this.restrictIndices = restrictIndices;
return getThis();
}
public String getRestrictSources() {
return restrictSources;
}
public T setRestrictSources(String restrictSources) {
this.restrictSources = restrictSources;
return getThis();
}
public Boolean getEnablePersonalization() {
return enablePersonalization;
}
public T setEnablePersonalization(Boolean enablePersonalization) {
this.enablePersonalization = enablePersonalization;
return getThis();
}
public Integer getPersonalizationImpact() {
return personalizationImpact;
}
public T setPersonalizationImpact(Integer personalizationImpact) {
this.personalizationImpact = personalizationImpact;
return getThis();
}
public List> getFacetFilters() {
return facetFilters;
}
public T setFacetFilters(List> facetFilters) {
this.facetFilters = facetFilters;
return getThis();
}
public Distinct getDistinct() {
return distinct;
}
public T setDistinct(Distinct distinct) {
this.distinct = distinct;
return getThis();
}
public AroundRadius getAroundRadius() {
return aroundRadius;
}
public T setAroundRadius(AroundRadius aroundRadius) {
this.aroundRadius = aroundRadius;
return getThis();
}
public RemoveWordsType getRemoveWordsIfNoResults() {
return removeWordsIfNoResults;
}
public T setRemoveWordsIfNoResults(RemoveWordsType removeWordsIfNoResults) {
this.removeWordsIfNoResults = removeWordsIfNoResults;
return getThis();
}
public RemoveStopWords getRemoveStopWords() {
return removeStopWords;
}
public T setRemoveStopWords(RemoveStopWords removeStopWords) {
this.removeStopWords = removeStopWords;
return getThis();
}
public TypoTolerance getTypoTolerance() {
return typoTolerance;
}
public T setTypoTolerance(TypoTolerance typoTolerance) {
this.typoTolerance = typoTolerance;
return getThis();
}
public IgnorePlurals getIgnorePlurals() {
return ignorePlurals;
}
public T setIgnorePlurals(IgnorePlurals ignorePlurals) {
this.ignorePlurals = ignorePlurals;
return getThis();
}
public List> getOptionalFilters() {
return optionalFilters;
}
public T setOptionalFilters(List> optionalFilters) {
this.optionalFilters = optionalFilters;
return getThis();
}
public Boolean getSumOrFiltersScores() {
return sumOrFiltersScores;
}
public T setSumOrFiltersScores(Boolean sumOrFiltersScores) {
this.sumOrFiltersScores = sumOrFiltersScores;
return getThis();
}
public Boolean getEnableABTest() {
return enableABTest;
}
public T setEnableABTest(Boolean enableABTest) {
this.enableABTest = enableABTest;
return getThis();
}
public Boolean getDecompoundQuery() {
return decompoundQuery;
}
public T setDecompoundQuery(Boolean decompoundQuery) {
this.decompoundQuery = decompoundQuery;
return getThis();
}
@JsonAnyGetter
public Map getCustomParameters() {
return customParameters;
}
@JsonAnySetter
public T setCustomParameters(Map customSettings) {
this.customParameters = customSettings;
return getThis();
}
@JsonAnySetter
public T setCustomParameter(String key, Object value) {
this.customParameters.put(key, value);
return getThis();
}
public Integer getRelevancyStrictness() {
return relevancyStrictness;
}
public T setRelevancyStrictness(Integer relevancyStrictness) {
this.relevancyStrictness = relevancyStrictness;
return getThis();
}
public Boolean getEnableReRanking() {
return enableReRanking;
}
public T setEnableReRanking(Boolean enableReRanking) {
this.enableReRanking = enableReRanking;
return getThis();
}
public String toParam() {
return QueryStringUtils.buildQueryAsQueryParams(this);
}
/* search */
@JsonProperty("query")
protected String query;
protected String similarQuery;
/* advanced */
protected Distinct distinct;
protected Boolean getRankingInfo;
protected List explain;
protected List naturalLanguages;
@JsonDeserialize(using = FiltersJsonDeserializer.class)
protected List> numericFilters;
@JsonDeserialize(using = FiltersJsonDeserializer.class)
protected List> tagFilters;
protected Boolean clickAnalytics;
protected Boolean analytics;
protected List analyticsTags;
protected Boolean synonyms;
protected Boolean replaceSynonymsInHighlight;
protected Integer minProximity;
protected List responseFields;
protected Long maxFacetHits;
protected Boolean percentileComputation;
protected List queryLanguages;
protected Boolean decompoundQuery;
protected Boolean enableReRanking;
/* attributes */
protected List attributesToRetrieve;
protected List restrictSearchableAttributes;
/* filtering-faceting */
protected String filters;
protected List facets;
protected Long maxValuesPerFacet;
@JsonDeserialize(using = FiltersJsonDeserializer.class)
protected List> facetFilters;
@JsonDeserialize(using = FiltersJsonDeserializer.class)
protected List> optionalFilters;
protected Boolean facetingAfterDistinct;
protected String sortFacetValuesBy;
/* geo-search */
protected String aroundLatLng;
protected Boolean aroundLatLngViaIP;
protected AroundRadius aroundRadius;
protected List aroundPrecision;
protected Integer minimumAroundRadius;
protected List> insideBoundingBox;
protected List> insidePolygon;
/* highlighting-snippeting */
protected List attributesToHighlight;
protected List attributesToSnippet;
protected String highlightPreTag;
protected String highlightPostTag;
protected String snippetEllipsisText;
protected Boolean restrictHighlightAndSnippetArrays;
/* pagination */
protected Integer page;
protected Integer hitsPerPage;
protected Integer offset;
protected Integer length;
/* performance */
// Nothing in Query
/* query rules */
protected Boolean enableRules;
protected List ruleContexts;
/* query strategy */
protected String queryType;
protected RemoveWordsType removeWordsIfNoResults;
protected Boolean advancedSyntax;
protected List advancedSyntaxFeatures;
protected List optionalWords;
protected RemoveStopWords removeStopWords;
protected List disableExactOnAttributes;
protected String exactOnSingleWordQuery;
protected List alternativesAsExact;
protected Boolean sumOrFiltersScores;
/* ranking */
// Nothing in Query
/* typos */
protected Integer minWordSizefor1Typo;
protected Integer minWordSizefor2Typos;
protected TypoTolerance typoTolerance;
protected Boolean allowTyposOnNumericTokens;
protected IgnorePlurals ignorePlurals;
protected List disableTypoToleranceOnAttributes;
/* SECURED API KEYS */
protected String userToken;
protected Integer validUntil;
protected List restrictIndices;
protected String restrictSources;
/* Personalization */
protected Boolean enablePersonalization;
protected Integer personalizationImpact;
/* Analytics */
protected Boolean enableABTest;
/* Custom Parameters */
protected Map customParameters = new HashMap<>();
/* Virtual Indices */
protected Integer relevancyStrictness;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy