Re: elasticsearch index creation and searching on japanese data

2015-02-26 Thread K.Samanth Kumar Reddy
My data is available in MSSQL database. I am able to read the japan data 
and create the index using java. Here I followed the same approach which I 
followed for creating the english data earlier. Am I doing in the right way?

In this case, will the default analyzer be applied automatically for Japan 
data also?. 


Thanks,
Samanth

-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/151216a7-16ac-4fa1-b4fc-ba076d1b6508%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: elasticsearch index creation and searching on japanese data

2015-02-26 Thread K.Samanth Kumar Reddy
Jason, Thank you very much!

It is very helpful.

Regards,
Samanth

-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/50996a49-48a3-4e1f-814a-08982f2a47a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


elasticsearch index creation and searching on japanese data

2015-02-25 Thread K.Samanth Kumar Reddy
Hi,

I am using elasticsearch  for last 6 months. I am very happy to work with 
elasticsearch till now.

But I have the following requirement:
I have the Japanese data. I want to create index on Japanese data. And also 
I want to search on indexed japanese data.

I did lot of google search, but I am not getting the proper guidance/link. 

Can anybody please help me. Thanks in advance!

Regards,
Samanth

-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1771c070-503d-4a60-b128-5b321d53ba43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


elasticsearch query on array of documents

2014-08-13 Thread K.Samanth Kumar Reddy
Hi,

I am using elasticsearch for last 6 months. This is awesome framework. 
I am unable to search on array of documents.

ex:-  Index documents 

{
cust_name: samanthaddress: [{
address1: india hyderabad
},
{
address1: india delhi
},
{
address1: india chennai
},
{
address1: india bangalore
}
]
}

{
cust_name: Ramaaddress: [{
address1: india Kolkata
},
{
address1: india bangalore
}
]
}

I want to search on address1 field.

Can anybody help me on this?

Thanks  Regards,
Samanth

-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/d3ffa90d-f49c-43dc-b128-d9c38a13a6f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Unable to set bounds to date histogram query.

2014-07-12 Thread K.Samanth Kumar Reddy
Hi,

I am using elasticsearch for last 3 months. It is really good for searching 
the billions of docs.
I have created an 'order' index and the document contains the 'orders' 
array. Please find the use case below.

Use Case: Get orders created in terms of Price and Count over a period of 
time month wise.
Ex:- I want the result only for last one year. I tried the following query. 
It is giving the result, but I am getting for all the years instead of last 
one year..

Can anybody please help me?

{
  aggregations : {
orders : {
  nested : {
path : orders
  },
  aggregations : {
date_histo : {
  date_histogram : {
field : orders.created_date,
interval : 1M,
extended_bounds : {
  min : now-1y/d,
  max : now
}
  },
  aggregations : {
tot_size : {
  sum : {
field : orders.price
  }
}
  }
}
  }
}
  }
}

Thanks  Regards,
Samanth

-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b66904a8-2906-4fb3-ad86-fc648a40f57b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ELASTIC SEARCH - GROUP BY QUERY ON ARRAY

2014-07-08 Thread K.Samanth Kumar Reddy
Hi,

I am working on elasticsearch for last 2 months. It is really providing 
awesome searching capabilities, good json structure documents etc...
Currently I am stuck up with the problem on How to write group by query and 
get the data.

Ex:- In this example company, prod_type are defined as 'not_analyzed'

Example Documents:

{company:ABC,orders:[{order_no:OL1, prod_type : OLP, 
price:20}, {order_no:OL2, prod_type : OLP, price:50}, 
{order_no:OL3, prod_type : GLP, price:100} ]}

{company:XYZ,orders:[{order_no:OL10, prod_type : GLP, 
price:50}, {order_no:OL20, prod_type : OLP, price:80}, 
{order_no:OL30, prod_type : GLP, price:100} ]}


My Requirement: I want the elasticsearch query to get the count, sum(price) 
based on prod_type
SQL Comparision Qry: SELECT COUNT(*), SUM(PRICE) FROM TABLE_NAME GROUP BY 
PROD_TYPE


Can anyone please help me this? 

Please let me know if you need more information.


Thanks,
Samanth

-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/227ad9cc-0327-48de-9df9-bc0c159d9250%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ELASTIC SEARCH - GROUP BY QUERY ON ARRAY

2014-07-08 Thread K.Samanth Kumar Reddy
Hi Vineeth,

Thank you very much. I will try and let you know.

Thanks,
Samanth

On Tuesday, July 8, 2014 4:23:18 PM UTC+5:30, K.Samanth Kumar Reddy wrote:

 Hi,

 I am working on elasticsearch for last 2 months. It is really providing 
 awesome searching capabilities, good json structure documents etc...
 Currently I am stuck up with the problem on How to write group by query 
 and get the data.

 Ex:- In this example company, prod_type are defined as 'not_analyzed'

 Example Documents:

 {company:ABC,orders:[{order_no:OL1, prod_type : OLP, 
 price:20}, {order_no:OL2, prod_type : OLP, price:50}, 
 {order_no:OL3, prod_type : GLP, price:100} ]}

 {company:XYZ,orders:[{order_no:OL10, prod_type : GLP, 
 price:50}, {order_no:OL20, prod_type : OLP, price:80}, 
 {order_no:OL30, prod_type : GLP, price:100} ]}


 My Requirement: I want the elasticsearch query to get the count, 
 sum(price) based on prod_type
 SQL Comparision Qry: SELECT COUNT(*), SUM(PRICE) FROM TABLE_NAME GROUP BY 
 PROD_TYPE


 Can anyone please help me this? 

 Please let me know if you need more information.


 Thanks,
 Samanth


-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/d02a3c0b-48f6-4be3-b4b9-a4f54c4f4fcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ELASTIC SEARCH - GROUP BY QUERY ON ARRAY

2014-07-08 Thread K.Samanth Kumar Reddy
Thank you very much. Its working.

Thanks,
Samanth

On Tuesday, July 8, 2014 4:23:18 PM UTC+5:30, K.Samanth Kumar Reddy wrote:

 Hi,

 I am working on elasticsearch for last 2 months. It is really providing 
 awesome searching capabilities, good json structure documents etc...
 Currently I am stuck up with the problem on How to write group by query 
 and get the data.

 Ex:- In this example company, prod_type are defined as 'not_analyzed'

 Example Documents:

 {company:ABC,orders:[{order_no:OL1, prod_type : OLP, 
 price:20}, {order_no:OL2, prod_type : OLP, price:50}, 
 {order_no:OL3, prod_type : GLP, price:100} ]}

 {company:XYZ,orders:[{order_no:OL10, prod_type : GLP, 
 price:50}, {order_no:OL20, prod_type : OLP, price:80}, 
 {order_no:OL30, prod_type : GLP, price:100} ]}


 My Requirement: I want the elasticsearch query to get the count, 
 sum(price) based on prod_type
 SQL Comparision Qry: SELECT COUNT(*), SUM(PRICE) FROM TABLE_NAME GROUP BY 
 PROD_TYPE


 Can anyone please help me this? 

 Please let me know if you need more information.


 Thanks,
 Samanth


-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/c1ca78ae-24ad-4afa-bbcb-9d17bb0f6fcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch Embedded Index Exact Match Query Is Not Working

2014-06-19 Thread K.Samanth Kumar Reddy
It seems exact match query is not working on embedded index of elastic 
search.

Is this an issue with elastic search?

Is there any one to help me on this?

Thanks,
Samanth

On Wednesday, June 18, 2014 11:06:38 PM UTC+5:30, K.Samanth Kumar Reddy 
wrote:

 Hi,

 I am using Lucene for last one year. I was successful in creating and 
 querying indexes using Lucene.
 Now I am newbie to elasticsearch. As a beginner of elasticsearch, I have 
 created an embedded index using JAVA API. 
 And I tried to query the index for exact match, I am failed, I am getting 
 zero results.

 Please find the sample code below:

 - Am I creating embedded index in the right way?
 - How to query exact match?
 - Can you please suggest me any example for embedded index  creating and 
 querying using java?

 I have an urgent requirement, Can anybody please help me on this? 


 Thanks,
 Samanth

 //
 /// Indexing 
 //

 // settings to initialize the node
 ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder();
 settings.put(path.home, 
 System.getProperty(user.home)+/elasticSearch);

 Node node = 
 NodeBuilder.nodeBuilder().settings(settings).clusterName(temp_cluster).node();

 // Get the client
 Client client = node.client();

 String indexName = index1;
 String indexType = type1;

 String jsonString1 =  {\name\:\elasticsearch\} ;
 client.prepareIndex(indexName, indexType, 1)
 .setSource(jsonString1).execute().actionGet();
 String jsonString2 =  {\name\:\search\} ;
 client.prepareIndex(indexName, indexType, 2)
 .setSource(jsonString2).execute().actionGet();
 
 // Searching
 

 QueryBuilder queryBuilder = QueryBuilders.termQuery(name, 
 elasticsearch);
 SearchRequestBuilder requestBuilder =
 client.prepareSearch(indexName)
 .setTypes(indexType)
 .setQuery(queryBuilder.toString());
 SearchResponse response1 = requestBuilder.execute().actionGet();

 SearchHit[] results = response1.getHits().getHits();
 System.out.println(Current Search Result Size:  + results.length);


-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/7248fa04-c2b3-4b80-926e-662c29e76dd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Elasticsearch Embedded Index Exact Match Query Is Not Working

2014-06-18 Thread K.Samanth Kumar Reddy
Hi,

I am using Lucene for last one year. I was successful in creating and 
querying indexes using Lucene.
Now I am newbie to elasticsearch. As a beginner of elasticsearch, I have 
created an embedded index using JAVA API. 
And I tried to query the index for exact match, I am failed, I am getting 
zero results.

Please find the sample code below:

- Am I creating embedded index in the right way?
- How to query exact match?
- Can you please suggest me any example for embedded index  creating and 
querying using java?

I have an urgent requirement, Can anybody please help me on this? 


Thanks,
Samanth

//
/// Indexing 
//

// settings to initialize the node
ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder();
settings.put(path.home, System.getProperty(user.home)+/elasticSearch);

Node node = 
NodeBuilder.nodeBuilder().settings(settings).clusterName(temp_cluster).node();

// Get the client
Client client = node.client();

String indexName = index1;
String indexType = type1;

String jsonString1 =  {\name\:\elasticsearch\} ;
client.prepareIndex(indexName, indexType, 1)
.setSource(jsonString1).execute().actionGet();
String jsonString2 =  {\name\:\search\} ;
client.prepareIndex(indexName, indexType, 2)
.setSource(jsonString2).execute().actionGet();

// Searching


QueryBuilder queryBuilder = QueryBuilders.termQuery(name, 
elasticsearch);
SearchRequestBuilder requestBuilder =
client.prepareSearch(indexName)
.setTypes(indexType)
.setQuery(queryBuilder.toString());
SearchResponse response1 = requestBuilder.execute().actionGet();

SearchHit[] results = response1.getHits().getHits();
System.out.println(Current Search Result Size:  + results.length);

-- 
You received this message because you are subscribed to the Google Groups 
elasticsearch group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/21fd3b58-9ecc-42a0-85d8-04d680f02c51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.