Skip to content

Instantly share code, notes, and snippets.

View Vineeth-Mohan's full-sized avatar

Vineeth Mohan Vineeth-Mohan

  • Factweavers
  • India
View GitHub Profile
> db.details.ensureIndex({name: 1});
> db.details.reIndex();
{
"nIndexesWas" : 2,
"msg" : "indexes dropped for collection",
"nIndexes" : 2,
"indexes" : [
{
"key" : {
"_id" : 1
<ivy-module version="2.0">
<info organisation="com.opengamma" module="og-analytics" revision="0.9.0-local-20120211095554" status="integration" publication="20120211095554"/>
<publications>
<artifact name="og-analytics" type="jar"/>
<artifact name="og-analytics" type="source" ext="jar"/>
</publications>
<dependencies>
<dependency name="og-util" rev="0.9.0-local-20120211095525" revConstraint="latest.integration"/>
Commands -
curl -X PUT "localhost:9200/algotree" -d '{ "settings" : { "index" : { "number_of_shards" : 2, "number_of_replicas" : 1 },
"analysis" : {"analyzer":{"my_analyzer" : { "tokenizer" : "keyword", "filter" : ["icu_normalizer"] }}}
}}'
echo
curl -X PUT "localhost:9200/algotree/public/_mapping" -d '{
"public" :{
"properties" :{
"id" : { "type" : "string" } ,
{
"query": {
"top_children": {
"type": "child",
"query": {
"term": {
"names": "god"
}
}
}
[2012-03-09 14:22:00,736][DEBUG][action.search.type ] [Nico Minoru] [algotree][0], node[JOCa1SFtRH2wb8M4mRwUNA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@6b6257]
org.elasticsearch.search.SearchParseException: [algotree][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"has_child":{"type":"attachment","query":{"query_string":{"default_field":"Content","query":"five"}}}}}]]
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:557)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:469)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:228)
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at org.elasticsearch.action.search.type.TransportSearchT
algotree@alpha:~/elasticSearch$ cat edgar.sh
#!/bin/bash
curl -X DELETE "localhost:9200/algotree"
echo
curl -X PUT "localhost:9200/algotree" -d '{ "settings" : { "index" : { "number_of_shards" : 2, "number_of_replicas" : 1 },
"analysis" : {"analyzer" : {"my_analyzer" : {"type" : "snowball","language" : "English" }}},
"filter" : { "my_snow" : {"type" : "snowball","language" : "English"}}
}}'
echo
curl -X PUT "localhost:9200/algotree/attachment/_mapping" -d '{
curl -X POST 'http://192.168.2.58:9200/algotree/filing/_search'
{
"query": {
"has_child": {
"type": "attachment",
"query": {
"query_string": {
"default_field": "Content",
"query": "five"
}
public class SecurityDocumentTime extends SecurityDocument{
public SecurityDocumentTime(ManageableSecurity security){
super(security);
}
@Override
public void setVersionFromInstant(Instant versionFromInstant) {
return;
}
public void setRealVersionFromInstant(Instant versionFromInstant) {
vineeth@vineeth-XPS-L501X:~/elasticSearch$ cat r.sh
#!/bin/bash
curl -X DELETE "localhost:9200/algotree"
echo
curl -X PUT "localhost:9200/algotree" -d '{ "settings" : { "index" : { "number_of_shards" : 2, "number_of_replicas" : 1 }}}'
echo
curl -X PUT "localhost:9200/algotree/public/_mapping" -d '{
"public" :{
"_all" : {"enabled" : true},
"properties" :{
Query JSON
{
"query": {
"query_string": {
"default_field": "names.name",
"query": "dinos"
}
},
"highlight": {
"fields": {