Examples of clone()


Examples of org.apache.lucene.facet.index.attributes.CategoryAttributeImpl.clone()

    CategoryPath cp = new CategoryPath("a", "b");
    ca1.setCategoryPath(cp);
    ca1.addProperty(new DummyProperty());

    CategoryAttribute ca2 = ca1.clone();
    assertEquals("Error in cloning", ca1, ca2);

    CategoryAttributeImpl ca3 = new CategoryAttributeImpl();
    assertNotSame("Should not be the same", ca1, ca3);
    ca1.copyTo(ca3);
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.clone()

          (created == null ? "" : created.stringValue()),
          hit.getField(IndexStatuses.StatusField.TEXT.name).stringValue()));
    }
   
    searcher.close();
    reader.clone();
  }
}
View Full Code Here

Examples of org.apache.lucene.index.IndexWriterConfig.clone()

    };
    IndexWriterConfig iwc = newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer);
    iwc.setCodec(_TestUtil.alwaysPostingsFormat(new Lucene41PostingsFormat()));
    // TODO we could actually add more fields implemented with different PFs
    // or, just put this test into the usual rotation?
    RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc.clone());
    Document doc = new Document();
    FieldType docsOnlyType = new FieldType(TextField.TYPE_NOT_STORED);
    // turn this on for a cross-check
    docsOnlyType.setStoreTermVectors(true);
    docsOnlyType.setIndexOptions(IndexOptions.DOCS_ONLY);
View Full Code Here

Examples of org.apache.lucene.index.Payload.clone()

      } else {
        previousPrefixToken.reinit(nextToken);
        // Make it a deep copy
        Payload p = previousPrefixToken.getPayload();
        if (p != null) {
          previousPrefixToken.setPayload((Payload) p.clone());
        }
        setCurrentToken(nextToken);
        return true;
      }
    }
View Full Code Here

Examples of org.apache.lucene.search.Query.clone()

    @Override
    public Query get(QueryParserSettings queryString) {
        Query value =  cache.getIfPresent(queryString);
        if (value != null) {
            return value.clone();
        } else {
            return null;
        }
    }
View Full Code Here

Examples of org.apache.lucene.search.spans.SpanQuery.clone()

    int sz = clauses.size();
    SpanQuery[] newClauses = new SpanQuery[sz];

    for (int i = 0; i < sz; i++) {
      SpanQuery clause = (SpanQuery) clauses.get(i);
      newClauses[i] = (SpanQuery) clause.clone();
    }
    PayloadNearQuery boostingNearQuery = new PayloadNearQuery(newClauses, slop,
        inOrder);
    boostingNearQuery.setBoost(getBoost());
    return boostingNearQuery;
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.clone()

        }
      }
     
      out.close();
      final IndexInput input = dir.openInput("foo", IOContext.DEFAULT);
      final DataInput in = input.clone();
     
      p.copy(input, input.length());
      final PagedBytes.Reader reader = p.freeze(random.nextBoolean());

      final byte[] verify = new byte[numBytes];
View Full Code Here

Examples of org.apache.lucene.util.BytesRef.clone()

              }
              cell = create("cell");
              add(r, cell);
              BytesRef payload = td.getPayload();
                if (payload!=null) {
                putProperty(r, "payload", (BytesRef)payload.clone());
              }
              add(pTable, r);
            } catch (IOException ioe) {
              errorMsg("Error: " + ioe.toString());
              return;
View Full Code Here

Examples of org.apache.mahout.cf.taste.model.PreferenceArray.clone()

      return Double.NaN;
    }
   
    // Copy prefs since we need to modify pref values to ranks
    xPrefs = xPrefs.clone();
    yPrefs = yPrefs.clone();
   
    // First sort by values from low to high
    xPrefs.sortByValue();
    yPrefs.sortByValue();
   
View Full Code Here

Examples of org.apache.mahout.df.mapreduce.MapredOutput.clone()

    for (Path path : outfiles) {
      Reader reader = new Reader(fs, path, conf);
     
      try {
        while (reader.next(key, value)) {
          output.put(key.get(), value.clone());
        }
      } finally {
        reader.close();
      }
    }
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.