Examples of Document()


Examples of org.apache.lucene.index.PruningReader.document()

    removeFields.put("test", PruningPolicy.DEL_POSTINGS | PruningPolicy.DEL_STORED);
    IndexReader in = IndexReader.open(sourceDir, true);
    TFTermPruningPolicy tfp = new TFTermPruningPolicy(in, removeFields, null, 2);
    StorePruningPolicy stp = new StorePruningPolicy(in, removeFields);
    PruningReader tfr = new PruningReader(in, stp, tfp);
    Document doc = tfr.document(4);
    // removed stored values?
    assertNull(doc.get("test"));
    // removed postings ?
    TermEnum te = tfr.terms();
    while (te.next()) {
View Full Code Here

Examples of org.apache.lucene.index.SegmentReader.document()

              return docs;
            }
            if (docsInRowSpanToFetch.fastGet(cursor)) {
              maxDocsToFetch--;
              int docID = primeDocId + cursor;
              segmentReader.document(docID, fieldSelector);
              Document document = fieldSelector.getDocument();
              if (highlighter.shouldHighlight()) {
                docs.add(highlighter.highlight(docID, document, segmentReader));
              } else {
                docs.add(document);
View Full Code Here

Examples of org.apache.lucene.pruning.PruningReader.document()

    //IndexReader in = IndexReader.open(sourceDir, true);
    IndexReader in = IndexReader.open(sourceDir);
    TFTermPruningPolicy tfp = new TFTermPruningPolicy(in, removeFields, null, 2);
    StorePruningPolicy stp = new StorePruningPolicy(in, removeFields);
    PruningReader tfr = new PruningReader(in, stp, tfp);
    Document doc = tfr.document(4);
    // removed stored values?
    assertNull(doc.get("test"));
    // removed postings ?
    TermEnum te = tfr.terms();
    while (te.next()) {
View Full Code Here

Examples of org.codehaus.preon.el.Reference.document()

        expect(selected1.getReferenceContext()).andReturn(context);
        replay(reference1, reference2, selected1, selected2);
        MultiReference multi = new MultiReference(reference1, reference2);
        Reference selected = multi.selectAttribute(propertyName);
        assertNotNull(selected);
        selected.document(document);
        verify(reference1, reference2, selected1, selected2);
    }

    @Test
    public void testNarrow() {
View Full Code Here

Examples of org.codehaus.preon.util.ParaContentsDocument.document()

                    .selectItem(index));
        }

        public void document(Document target) {
            ParaContentsDocument doc = new ParaContentsDocument(target);
            doc.document(Documenters.forDescriptor(descriptor));
        }

        private static class IndexReference implements Reference<Resolver> {

            private ReferenceContext<Resolver> context;
View Full Code Here

Examples of org.fao.geonet.kernel.search.index.GeonetworkMultiReader.document()

            TopDocs tdocs = searcher.search(query, 1);

            if (tdocs.totalHits > 0) {

                Set<String> id = Collections.singleton("_id");
                Document element = reader.document(tdocs.scoreDocs[0].doc, id);
                return element.get("_id");
            }

            return null;
        } finally {
View Full Code Here

Examples of org.jdom.JDOMFactory.document()

         */
        JDOMFactory f = factory;
        if (f == null) {
            f = new UncheckedJDOMFactory();
        }
        Document doc = f.document(null);
        buildTree(f, r, doc);
        return doc;
    }

    /**
 
View Full Code Here

Examples of org.jdom.input.JDOMFactory.document()

                    layout.getNamespace());
            Element newDeviceLayout = (Element) deviceLayout.clone();

            // Put the new layout in a document to allow absolute XPaths
            // to operate correctly
            factory.document(newLayout);

            // Put the cloned device layout into the new layout
            newLayout.addContent(newDeviceLayout);

            // Locate the equivalent element in the clone to that
View Full Code Here

Examples of org.joox.Match.document()

        dir.mkdirs();

        System.out.println("Transforming manual");
        FileOutputStream out = new FileOutputStream(new File(dir, "index.php"));

        Source source = new DOMSource(manual.document());
        Result target = new StreamResult(out);

        transformer.transform(source, target);

        out.close();
View Full Code Here

Examples of org.lilypondbeans.jccparser.Parser.Document()

            String text = "{" + doc.getText(pos, len).trim() + "}";//"a" is parsed as declaration
            ret.type = TYPE_NOTE;
            ret.node = pitch;
            ByteArrayInputStream in = new ByteArrayInputStream(text.getBytes());
            Parser p = new Parser(in);
            ASTDocument ll = p.Document();
            ret.pitch = (ASTPitch) ll.jjtGetChild(0).jjtGetChild(0);
            int x = text.length() - 1;
            ret.rest = "";

        } catch (Exception ex) {
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.