Examples of StrlenSearchSortSpec


Examples of io.druid.query.search.search.StrlenSearchSortSpec

public class StrlenSearchSortSpecTest
{
  @Test
  public void testComparator()
  {
    SearchSortSpec spec = new StrlenSearchSortSpec();

    SearchHit hit1 = new SearchHit("test", "a");
    SearchHit hit2 = new SearchHit("test", "apple");
    SearchHit hit3 = new SearchHit("test", "elppa");

    Assert.assertTrue(spec.getComparator().compare(hit2, hit3) < 0);
    Assert.assertTrue(spec.getComparator().compare(hit2, hit1) > 0);
    Assert.assertTrue(spec.getComparator().compare(hit1, hit3) < 0);
  }
View Full Code Here

Examples of io.druid.query.search.search.StrlenSearchSortSpec

                )
            )
        )
    );

    Result<SearchResultValue> actual = new SearchBinaryFn(new StrlenSearchSortSpec(), QueryGranularity.ALL, Integer.MAX_VALUE).apply(r1, r2);
    Assert.assertEquals(expected.getTimestamp(), actual.getTimestamp());
    assertSearchMergeResult(expected.getValue(), actual.getValue());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.