Examples of ElasticSearchDocument


Examples of ch.entwine.weblounge.search.impl.elasticsearch.ElasticSearchDocument

    if (serializer == null)
      throw new ContentRepositoryException("Unable to create an input document for " + resource + ": no serializer found");

    // Add the resource to the index
    List<ResourceMetadata<?>> resourceMetadata = serializer.toMetadata(resource);
    ElasticSearchDocument doc = new ElasticSearchDocument(uri, resourceMetadata);
    try {
      update(doc);
    } catch (Throwable t) {
      throw new ContentRepositoryException("Cannot write resource " + resource + " to index", t);
    }
View Full Code Here

Examples of ch.entwine.weblounge.search.impl.elasticsearch.ElasticSearchDocument

      if (alternateVersions.getValues().size() > 0) {
        resourceMetadata.add(alternateVersions);
      }

      // Write the resource to the index
      documents.add(new ElasticSearchDocument(r.getURI(), resourceMetadata));
    }

    // Now update all documents at once
    try {
      update(documents.toArray(new ElasticSearchDocument[documents.size()]));
View Full Code Here

Examples of ch.entwine.weblounge.search.impl.elasticsearch.ElasticSearchDocument

    metadata = new ArrayList<ResourceMetadata<?>>(metadataMap.values());

    // Read the current resource and post the updated data to the search
    // index
    try {
      update(new ElasticSearchDocument(resource.getURI(), metadata));
      return true;
    } catch (Throwable t) {
      throw new ContentRepositoryException("Cannot update resource " + uri + " in index", t);
    }
  }
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.