Java Code Examples for org.apache.lucene.search.SortField.Type#STRING

The following examples show how to use org.apache.lucene.search.SortField.Type#STRING . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChildFieldValueSourceParser.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
@Override
public SortField getSortField(boolean reverse) {
  final Type type = childField.getSortField(reverse).getType();
    return new ToParentBlockJoinSortField(childField.getName(), 
        type, reverse, 
        parentFilter, childFilter) {
      @SuppressWarnings("unchecked")
      @Override
      public FieldComparator<?> getComparator(int numHits, int sortPos) {
        final FieldComparator<?> comparator = super.getComparator(numHits, sortPos);
        return type ==Type.STRING ?  new BytesToStringComparator((FieldComparator<BytesRef>) comparator)
            : comparator;
      }
    };
}
 
Example 2
Source File: StringFieldTypeDefinition.java    From incubator-retired-blur with Apache License 2.0 5 votes vote down vote up
@Override
public SortField getSortField(boolean reverse) {
  if (reverse) {
    return new SortField(getFieldName(), Type.STRING, reverse);
  }
  return new SortField(getFieldName(), Type.STRING);
}
 
Example 3
Source File: AclReadFieldTypeDefinition.java    From incubator-retired-blur with Apache License 2.0 5 votes vote down vote up
@Override
public SortField getSortField(boolean reverse) {
  if (reverse) {
    return new SortField(getFieldName(), Type.STRING, reverse);
  }
  return new SortField(getFieldName(), Type.STRING);
}
 
Example 4
Source File: AclDiscoverFieldTypeDefinition.java    From incubator-retired-blur with Apache License 2.0 5 votes vote down vote up
@Override
public SortField getSortField(boolean reverse) {
  if (reverse) {
    return new SortField(getFieldName(), Type.STRING, reverse);
  }
  return new SortField(getFieldName(), Type.STRING);
}
 
Example 5
Source File: ColumnMapperBlob.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}
 
Example 6
Source File: ColumnMapperBigInteger.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}
 
Example 7
Source File: ColumnMapperString.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}
 
Example 8
Source File: ColumnMapperInet.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}
 
Example 9
Source File: ColumnMapperText.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}
 
Example 10
Source File: ColumnMapperBoolean.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}
 
Example 11
Source File: ColumnMapperUUID.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}
 
Example 12
Source File: ColumnMapperBigDecimal.java    From stratio-cassandra with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public SortField sortField(String field, boolean reverse) {
    return new SortField(field, Type.STRING, reverse);
}