com.visenze.visearch.BaseSearchParams Maven / Gradle / Ivy
package com.visenze.visearch;
import com.google.common.base.Joiner;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Common parameters for /search, /colorsearch, and /uploadsearch.
* Provide setters to override default values.
*/
public class BaseSearchParams> {
private static final List DEFAULT_FACET_FIELD = Lists.newArrayList();
private static final Boolean DEFAULT_SCORE = false;
private static final Map DEFAULT_FQ = new HashMap();
private static final List DEFAULT_FL = Lists.newArrayList();
private static final Boolean DEFAULT_QINFO = false;
private static final Map DEFAULT_CUSTOM = new HashMap();
private static final Boolean DEFAULT_GET_ALL_FL = false;
private static final Boolean DEFAULT_DEDUP = false;
protected Optional page = Optional.absent();
protected Optional limit = Optional.absent();
protected Optional> facets = Optional.absent();
protected Optional facetsLimit = Optional.absent();
protected Optional facetsShowCount = Optional.absent();
protected Optional score = Optional.absent();
protected Optional scoreMin = Optional.absent();
protected Optional scoreMax = Optional.absent();
protected Optional