Indexing API for document do be indexed in HashMap format*
342717
public void indexDocument(HashMap<String,Object>indexMap) throws Exception {
		SolrInputDocument solrDoc=this.buildSolrDocument(indexMap);
		String docXML=this.convertSolrDocInXML(solrDoc);
		String xml = "<add>" + docXML + "</add>";
		DirectXmlRequest xmlreq = new DirectXmlRequest("/update", xml);
		server.request(xmlreq);
	}
769379
def get_documents(ios)
      ios.each_with_index.map do |io, index|
        {
          documentId: "#{index + 1}",
          name: io.original_filename
        }
      end
    end
1033336
public  String addDateMapDocument(String indexName,  Map bean) throws ElasticSearchException{
		return addDateMapDocument(  indexName,  _doc,   bean);
	}
1316689
private int indexOf(int key) {
		int startIndex = hashIndex(key);
		int index = startIndex;

		for (;;) {
			if (values[index] == null) {
				// It's available, so no chance that this value exists anywhere in the map.
				return -1;
			}
			if (key == keys[index]) {
				return index;
			}

			// Conflict, keep probing ...
			if ((index = probeNext(index)) == startIndex) {
				return -1;
			}
		}
	}
1079941
public String addDateDocumentsWithIdKey(String indexName, String indexType, List<Map> beans,String docIdKey) throws ElasticSearchException{
		return addDocumentsWithIdKey(this.indexNameBuilder.getIndexName(indexName),   indexType,     beans,docIdKey);
	}
168401
function indexMap(s) {
        if (typeof s == 'string') {
            return indexMapStr(s);
        } else {
            var ret = [],
                i = 0,
                l = s.length;
            for (; i < l; i++) {
                ret[i] = indexMapStr(s[i]);
            }
            return ret;
        }
    }
369904
private void addToIndex(Map<String, String> param) throws Exception {
        String doc = writeUpdateString(param);
        addToBuffer(doc);
    }
638057
public String addDateMapDocument(String indexName, String indexType, Map bean) throws ElasticSearchException{
		return addDocument(  this.indexNameBuilder.getIndexName(indexName),   indexType,   bean,null,null,null,(String )null);
	}
446610
function _getByIndex(indexName, indexData, callback) {
    // generate the index
    var index = indexName + '-' +
      crypto.createHash('sha256').update(indexData).digest('hex');

    // fetch the value of the index
    client.get(index, function(err, reply) {
      if(err) {
        return callback(err);
      }
      if(!reply) {
        // index does not exist
        return callback(null, null);
      }

      // fetch the actual data
      client.get(reply, _deserializeJson(callback));
    });
  }
866010
function indexPages(header) {
    var map = {};
    u.each(generator.pages, function(page) {
      u.each(u.getaVals(page, header), function(val) {
        map[val] = page;
      });
    });
    return map;
  }
594588
private static synchronized final HashMap<String, String> readExtensionMappings(String mappingFile) throws Exception {

        HashMap<String, String> extensionMappings = new HashMap<String, String>();

        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        Document doc = factory.newDocumentBuilder().parse(new File(mappingFile));
        Element root = doc.getDocumentElement();
        // "mime-mapping" elements are children of root
        NodeList mappingNodes = root.getChildNodes();
        for (int i = 0; i < mappingNodes.getLength(); i++) {
            Node mappingNode = mappingNodes.item(i);
            // check it's a mime-mapping element
            if (mappingNode.getNodeType() == Node.ELEMENT_NODE && mappingNode.getNodeName().equals("mime-mapping")) {
                // look for child elements "extension" and "mime-type" and get values from text nodes
                String extension = null;
                String mimeType = null;
                NodeList nl = mappingNode.getChildNodes();
                for (int j = 0; j < nl.getLength(); j++) {
                    Node n = nl.item(j);
                    if (n.getNodeType() == Node.ELEMENT_NODE) {
                        // assuming here that extension and mime-type nodes only have text content (no attrs etc)
                        if (n.getNodeName().equals("extension")) {
                            extension = n.getFirstChild().getNodeValue();
                        } else {
                            if (n.getNodeName().equals("mime-type")) {
                                mimeType = n.getFirstChild().getNodeValue();
                            }
                        }
                    }
                }
                // if we've got an extension and mime-type, and it's not in the list, add it.
                if (extension != null && mimeType != null) {
                    if (!extensionMappings.containsKey(mimeType)) {
                        extensionMappings.put(mimeType, extension);
                    } else {
                        logger.warn("Duplicate extension " + extension + " found for mime-type " + mimeType + " in " + mappingFile);
                    }
                } else {
                    logger.warn("Element mime-mapping is missing child elements mime-type and/or extension in " + mappingFile);
                }
            }
        }
        return extensionMappings;
    }
355218
public  String addDateMapDocument(String indexName, String indexType, Map params,ClientOptions clientOptions) throws ElasticSearchException{
		return addMapDocument(this.indexNameBuilder.getIndexName(indexName),   indexType,   params,clientOptions);
	}
839512
private Map<String, Object> documentToPackableMap(Map<String, Object> document) {
        if (compatibleValues) {
            try {
                return jsonMapper.readValue(jsonMapper.writeValueAsBytes(document), new TypeReference<Map<String, Object>>() {
                });
            } catch (Exception e) {
                throw new RuntimeException("Cannot convert document to json and back to Map " + e.getMessage());
            }
        }

        /**
         * A document in MongoDB has a special field "_id" of type ObjectId
         * This object is not "packable" by Neo4jPacker so it must be converted to a value that Neo4j can deal with
         *
         * If the document is not null we simply override the ObjectId instance with its string representation
         */

        if (document != null) {
            Object objectId = document.get("_id");
            if (objectId != null) {
                document.put("_id", objectId.toString());
            }

        }

        return document;
    }
127729
static String readMapping(String root, String index) throws IOException {
		if (root == null) {
			return readMapping(index);
		}
		String mappingFile = root + "/" + index + "/_doc" + Defaults.JsonFileExtension;
		return readFileFromClasspath(mappingFile);
	}
312502
@Override
    public <V> Observable<V> mapGet(final String docId, final String key, Class<V> valueType) {
        final Func1<DocumentFragment<Lookup>, V> mapResult = new Func1<DocumentFragment<Lookup>, V>() {
            @Override
            public V call(DocumentFragment<Lookup> documentFragment) {
                ResponseStatus status = documentFragment.status(0);
                if (status == ResponseStatus.SUCCESS) {
                    return (V) documentFragment.content(0);
                } else if (status == ResponseStatus.SUBDOC_PATH_NOT_FOUND) {
                    throw new PathNotFoundException("Key not found in map");
                } else {
                    throw new CouchbaseException(status.toString());
                }
            }
        };
        return lookupIn(docId).get(key)
                .execute()
                .map(mapResult);
    }
727783
public MapSearchHit getDocumentHit(String indexName,  String documentId) throws ElasticSearchException{
		return getDocumentHit(indexName,  _doc,documentId);
	}
1043461
public   MapSearchHit getDocumentHit(String indexName, String indexType,String documentId,Map<String,Object> options) throws ElasticSearchException{
		try {
			MapSearchHit searchResult = this.client.executeRequest(BuildTool.buildGetDocumentRequest(indexName, indexType, documentId, options), null, new GetDocumentHitResponseHandler(), ClientUtil.HTTP_GET);
			return searchResult;
		}
		catch(ElasticSearchException e){
			return ResultUtil.hand404HttpRuntimeException(e,MapSearchHit.class,ResultUtil.OPERTYPE_getDocument);
		}
	}