Package org.apache.blur.thrift.generated

Examples of org.apache.blur.thrift.generated.Selector$SelectorStandardSchemeFactory


      String query = generateQuery(builder, random, sampleOfTerms, numberOfTermsPerQuery);
      final BlurQuery blurQuery = new BlurQuery();
      blurQuery.query = new Query();
      blurQuery.query.query = query;
      blurQuery.cacheResult = false;
      blurQuery.selector = new Selector();
      long qs = System.nanoTime();

      BlurResults results = client.query(tableName, blurQuery);
      long qe = System.nanoTime();
      resultCount += results.totalResults;
View Full Code Here


    }
  }
 
  @Test
  public void testFetchDocuments() throws CorruptIndexException, LockObtainFailedException, IOException{
    Selector selector = new Selector();
    List<String> columnFamiliesToFetch = new ArrayList<String>();
    columnFamiliesToFetch.add("f1");
    columnFamiliesToFetch.add("f2");
    selector.setColumnFamiliesToFetch(columnFamiliesToFetch);
   
    ResetableDocumentStoredFieldVisitor resetableDocumentStoredFieldVisitor = new ResetableDocumentStoredFieldVisitor();
    List<Document> docs = BlurUtil.fetchDocuments(getReader(), new Term("a","b"), resetableDocumentStoredFieldVisitor, selector, 10000000, "test-context");
    assertEquals(docs.size(),1);
  }
View Full Code Here

    assertEquals(docs.size(),1);
  }
 
  @Test
  public void testFetchDocumentsStrictFamilyOrder() throws CorruptIndexException, LockObtainFailedException, IOException{
    Selector selector = new Selector();
    List<String> columnFamiliesToFetch = new ArrayList<String>();
    columnFamiliesToFetch.add("f1");
    columnFamiliesToFetch.add("f2");
    selector.setColumnFamiliesToFetch(columnFamiliesToFetch);
   
    ResetableDocumentStoredFieldVisitor resetableDocumentStoredFieldVisitor = new ResetableDocumentStoredFieldVisitor();
    List<Document> docs = BlurUtil.fetchDocuments(getReaderWithDocsHavingFamily(), new Term("a","b"), resetableDocumentStoredFieldVisitor, selector, 10000000, "test-context");
    assertEquals(docs.size(),2);
    assertEquals(docs.get(0).getField("family").stringValue(),"f1");
View Full Code Here

    assertEquals(docs.get(1).getField("family").stringValue(),"f2");
  }
 
  @Test
  public void testFetchDocumentsWithoutFamily() throws CorruptIndexException, LockObtainFailedException, IOException{
    Selector selector = new Selector();
    ResetableDocumentStoredFieldVisitor resetableDocumentStoredFieldVisitor = new ResetableDocumentStoredFieldVisitor();
    List<Document> docs = BlurUtil.fetchDocuments(getReader(), new Term("a","b"), resetableDocumentStoredFieldVisitor, selector, 10000000, "test-context");
    assertEquals(docs.size(),2);
  }
View Full Code Here

        } else {
          out.println(family + " - " + new TreeSet<String>(columnsToFetch.get(family)));
        }
      }
    } else if (command.equals("reset")) {
      Main.selector = new Selector();
    } else if (command.equals("add")) {
      if (args.length < 3) {
        throw new CommandException("Invalid args: " + help());
      }
      String family = args[2];
View Full Code Here

  private void doItInternal(Blur.Iface client, String[] args, PagingPrintWriter out) throws BlurException, TException,
      FinishedException {
    String tablename = args[1];
    String rowId = args[2];

    Selector selector = new Selector(Main.selector);
    selector.setRowId(rowId);
    FetchResult fetchRow = client.fetchRow(tablename, selector);
    FetchRowResult rowResult = fetchRow.getRowResult();
    if (rowResult == null) {
      out.println("Row [" + rowId + "] not found.");
      return;
View Full Code Here

    }
  }

  @Test
  public void testFetchDocuments() throws CorruptIndexException, LockObtainFailedException, IOException {
    Selector selector = new Selector();
    selector.setLocationId("shard/0");
    Set<String> columnFamiliesToFetch = new HashSet<String>();
    columnFamiliesToFetch.add("f1");
    columnFamiliesToFetch.add("f2");
    selector.setColumnFamiliesToFetch(columnFamiliesToFetch);

    ResetableDocumentStoredFieldVisitor resetableDocumentStoredFieldVisitor = new ResetableDocumentStoredFieldVisitor();
    // List<Document> docs = BlurUtil.fetchDocuments(getReader(), new
    // Term("a","b"), resetableDocumentStoredFieldVisitor, selector, 10000000,
    // "test-context", new
View Full Code Here

  }

  @Test
  public void testFetchDocumentsStrictFamilyOrder() throws CorruptIndexException, LockObtainFailedException,
      IOException {
    Selector selector = new Selector();
    selector.setLocationId("shard/0");
    Set<String> columnFamiliesToFetch = new HashSet<String>();
    columnFamiliesToFetch.add("f1");
    columnFamiliesToFetch.add("f2");
    selector.setColumnFamiliesToFetch(columnFamiliesToFetch);
    selector.addToOrderOfFamiliesToFetch("f1");
    selector.addToOrderOfFamiliesToFetch("f2");

    ResetableDocumentStoredFieldVisitor resetableDocumentStoredFieldVisitor = new ResetableDocumentStoredFieldVisitor();
    AtomicBoolean moreDocsToFetch = new AtomicBoolean(false);
    AtomicInteger totalRecords = new AtomicInteger();
    List<Document> docs = BlurUtil.fetchDocuments(getReaderWithDocsHavingFamily(), resetableDocumentStoredFieldVisitor,
View Full Code Here

    assertEquals(2, totalRecords.get());
  }

  @Test
  public void testFetchDocumentsWithoutFamily() throws CorruptIndexException, LockObtainFailedException, IOException {
    Selector selector = new Selector();
    selector.setLocationId("shard/0");
    ResetableDocumentStoredFieldVisitor resetableDocumentStoredFieldVisitor = new ResetableDocumentStoredFieldVisitor();
    AtomicBoolean moreDocsToFetch = new AtomicBoolean(false);
    AtomicInteger totalRecords = new AtomicInteger();
    List<Document> docs = BlurUtil.fetchDocuments(getReader(), resetableDocumentStoredFieldVisitor, selector, 10000000,
        "test-context", new Term(BlurConstants.PRIME_DOC, BlurConstants.PRIME_DOC_VALUE), null, moreDocsToFetch,
View Full Code Here

      checkTable(_cluster, table);
      resetSearchers();
      _queryChecker.checkQuery(blurQuery);
      checkSelectorFetchSize(blurQuery.getSelector());
      BlurQuery original = new BlurQuery(blurQuery);
      Selector selector = original.getSelector();
      if (selector != null) {
        HighlightOptions highlightOptions = selector.getHighlightOptions();
        if (highlightOptions != null && highlightOptions.getQuery() == null) {
          highlightOptions.setQuery(blurQuery.getQuery());
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.blur.thrift.generated.Selector$SelectorStandardSchemeFactory

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.