Package io.druid.query.extraction

Examples of io.druid.query.extraction.SearchQuerySpecDimExtractionFn


  public void testExtraction()
  {
    SearchQuerySpec spec = new FragmentSearchQuerySpec(
        Arrays.asList("to", "yo")
    );
    DimExtractionFn dimExtractionFn = new SearchQuerySpecDimExtractionFn(spec);
    List<String> expected = Arrays.asList("Kyoto", "Tokyo", "Toyokawa", "Yorktown");
    Set<String> extracted = Sets.newHashSet();

    for (String str : testStrings) {
      String res = dimExtractionFn.apply(str);
      if (res != null) {
        extracted.add(res);
      }
    }
View Full Code Here

TOP

Related Classes of io.druid.query.extraction.SearchQuerySpecDimExtractionFn

Copyright © 2018 www.massapicom. 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.