Codota Logo
WikittyQuery.getFacetSort
Code IndexAdd Codota to your IDE (free)

How to use
getFacetSort
method
in
org.nuiton.wikitty.query.WikittyQuery

Best Java code snippets using org.nuiton.wikitty.query.WikittyQuery.getFacetSort (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.nuiton.wikitty/wikitty-api

public Map<String, List<FacetTopic>> getFacets() {
  Map<String, List<FacetTopic>> result = new HashMap<String, List<FacetTopic>>();
  for (String facetName : topic.keySet()) {
    List<FacetTopic> list = new ArrayList<FacetTopic>();
    Multiset b = topic.get(facetName);
    for (Object topicName : b.elementSet()) {
      int count = b.count(topicName);
      // pour ajouter le topic il faut un minimum indique dans la query
      if (count >= query.getFacetMinCount()) {
        FacetTopic ft = new FacetTopic(facetName, String.valueOf(topicName), count);
        list.add(ft);
      }
    }
    // on re-tri si besoin, sinon l'ordre par defaut est sur la valeur des topics
    if (query.getFacetSort() == FacetSortType.count) {
      Collections.sort(list, query.getFacetSort().compartor);
    }
    // ... et on en prend que le nombre demande
    if (list.size() > query.getFacetLimit()) {
      list = list.subList(0, query.getFacetLimit());
    }
    result.put(facetName, list);
  }
  return result;
}
origin: org.nuiton.wikitty/wikitty-solr

querySolr.setFacetMinCount(queryWithoutSelect.getFacetMinCount());
querySolr.setFacetLimit(queryWithoutSelect.getFacetLimit());
querySolr.setFacetSort(queryWithoutSelect.getFacetSort().solrValue);
origin: org.nuiton.wikitty/wikitty-api

@Override
public boolean equals(Object o) {
  boolean result;
  if (o == null) {
    result = false;
  } else if (ObjectUtils.equals(this.getClass(), o.getClass())) {
    WikittyQuery other = (WikittyQuery)o;
    result = ObjectUtils.equals(this.getName(), other.getName()) &&
        ObjectUtils.equals(this.getOffset(), other.getOffset()) &&
        ObjectUtils.equals(this.getLimit(), other.getLimit()) &&
        ObjectUtils.equals(this.isFacetExtension(), other.isFacetExtension()) &&
        ObjectUtils.equals(this.getFacetField(), other.getFacetField()) &&
        ObjectUtils.equals(this.getSortAscending(), other.getSortAscending()) &&
        ObjectUtils.equals(this.getSortDescending(), other.getSortDescending()) &&
        ObjectUtils.equals(this.getFacetLimit(), other.getFacetLimit()) &&
        ObjectUtils.equals(this.getFacetSort(), other.getFacetSort()) &&
        ObjectUtils.equals(this.getFacetMinCount(), other.getFacetMinCount()) &&
        ObjectUtils.equals(this.getFacetQuery(), other.getFacetQuery()) &&
        ObjectUtils.equals(this.getCondition(), other.getCondition()) &&
        ObjectUtils.equals(this.getWikittyFieldSearchDepth(), other.getWikittyFieldSearchDepth());
  } else {
    result = false;
  }
  return result;
}
origin: org.nuiton.wikitty/wikitty-api

@Override
public boolean visitEnter(WikittyQuery o) {
  WikittyQuery q = getQuery();
  q.setFacetExtension(q.isFacetExtension());
  q.setFacetField(new ArrayList<Element>(o.getFacetField()));
  q.setFacetLimit(o.getFacetLimit());
  q.setFacetMinCount(o.getFacetMinCount());
  q.setOffset(o.getOffset());
  q.setLimit(o.getLimit());
  q.setFacetSort(o.getFacetSort());
  q.setName(o.getName());
  q.setSortAscending(new ArrayList<Element>(o.getSortAscending()));
  q.setSortDescending(new ArrayList<Element>(o.getSortDescending()));
  q.setWikittyFieldSearchDepth(o.getWikittyFieldSearchDepth());
  for (FacetQuery c : o.getFacetQuery()) {
    WikittyQueryVisitorCopy v = new WikittyQueryVisitorCopy();
    c.getCondition().accept(v);
    Condition condition = v.getCondition();
    q.addFacetQuery(c.getName(), condition);
  }
  return true;
}
org.nuiton.wikitty.queryWikittyQuerygetFacetSort

Popular methods of WikittyQuery

  • addFacetField
  • getCondition
  • setLimit
    Set result limit. 0 return no result (usefull for facets and result count). negative value or #MAX r
  • setOffset
    Indique le premier element retourne par la requete. Si la requete peut retourner 100 reponses, et qu
  • <init>
  • copy
  • getFacetField
  • getFacetLimit
  • getFacetMinCount
  • getFacetQuery
  • getLimit
    Get result limit. 0 return no result (usefull for facets and result count). -1 return all results.
  • getName
  • getLimit,
  • getName,
  • getOffset,
  • getSelect,
  • getSortAscending,
  • getSortDescending,
  • getWhereQuery,
  • getWikittyFieldSearchDepth,
  • isFacetExtension

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Reference (javax.naming)
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now