Package com.github.rnewson.couchdb.lucene.rhino

Examples of com.github.rnewson.couchdb.lucene.rhino.RhinoDocument.toDocument()


            return NO_DOCUMENTS;
        }

        if (result instanceof RhinoDocument) {
            final RhinoDocument rhinoDocument = (RhinoDocument) result;
            final Document document = rhinoDocument.toDocument(doc.getId(), defaults, database);
            return Collections.singleton(document);
        }

        if (result instanceof NativeArray) {
            final NativeArray nativeArray = (NativeArray) result;
View Full Code Here


            final NativeArray nativeArray = (NativeArray) result;
            final Collection<Document> arrayResult = new ArrayList<Document>((int) nativeArray.getLength());
            for (int i = 0; i < (int) nativeArray.getLength(); i++) {
                if (nativeArray.get(i, null) instanceof RhinoDocument) {
                    final RhinoDocument rhinoDocument = (RhinoDocument) nativeArray.get(i, null);
                    final Document document = rhinoDocument.toDocument(
                            doc.getId(),
                            defaults,
                            database);
                    arrayResult.add(document);
                }
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.