List of usage examples for org.apache.lucene.search SortField hashCode
@Override public int hashCode()
From source file:org.apache.solr.search.join.TestNestedDocsSort.java
License:Apache License
private void assertEq(SortField sortField, SortField sortField2) { assertEquals(sortField, sortField2); assertEquals(sortField.hashCode(), sortField2.hashCode()); }
From source file:org.apache.solr.search.QueryResultKey.java
License:Apache License
public QueryResultKey(Query query, List<Query> filters, Sort sort, int nc_flags) { this.query = query; this.sort = sort; this.filters = filters; this.nc_flags = nc_flags; int h = query.hashCode(); if (filters != null) { for (Query filt : filters) h += filt.hashCode();//from w w w .j a v a2 s .co m } sfields = (this.sort != null) ? this.sort.getSort() : defaultSort; for (SortField sf : sfields) { h = h * 29 + sf.hashCode(); } hc = h; }