Re: Exists filter does not respect must_not bool filter

2014-09-05 Thread Ayush Sangani

>
>
>
> Appreciate your explanation, and as per your suggestion range filter gives 
> correct results.
> I am still confused with the usage of exists filter.
>
> As per my understanding the implementation of exists filter is changed in 
> v1.3 to increase the speed but why it deviates from it's expected behavior.
>
   No doubt exists filter might be fast or optimized but it is chopping off 
more than half of the results. 

>
> For Example:
>
>I want to find out number of documents  where "giving.assignee" field 
exists.
   Note: "giving.assignee" is a string analyzed field.

>
>   
> {
> "query": {
> "filtered": {
> "filter": {
> "exists": {
> "field": "giving.assignee"
> }
> }
> }
> },
> "size": 2000
> }
>
>
  Above query returns only 25607 documents whereas it should return 110827 
documents.

 And If I run above query using range filter it gives me expected results 
i.e. 110827 documents.
Query: 

{
"query": {
"filtered": {
"filter": {
"range": {
    "giving.assignee": {}
}
}
}
},
"size": 2000
}

 
 Can someone please explain the difference?
 It would be helpful to know when to use Exists filter ?

Thanks,
Ayush Sangani

-- 
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/db4b6fdd-cbc1-49db-aa37-2abd4fd08247%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using existing field for mapping

2014-08-05 Thread Ayush
I am using Java API, but have tried doing this using,

1) putting a mapping file in /config/mapping etc.
2) Using curl




On Monday, August 4, 2014 1:35:00 PM UTC+5:30, Tihomir Lichev wrote:
>
> What API are you using to communicate with ES ?
>
> 03 август 2014, неделя, 11:14:59 UTC+3, Ayush написа:
>>
>> I am new to elastic search, I have created an index "cmn" with a type 
>> "mention". I am trying to import data from my existing solr to 
>> elasticsearch, so I want to map an existing field to the _id field.
>>
>> I have created the following file under /config/mappings/cmn/,
>>
>> {
>> "mappings": {
>> "mentions":{
>> "_id" : {
>> "path" : "docKey"
>> }
>>   }
>> }
>> }
>>
>> But this doesn't seem to be working, every time I index a record the 
>> following _id is created,
>>
>> "_index": "cmn",
>> "_type": "mentions",
>> "_id": "k4E0dJr6Re2Z39HAIjYMmg",
>> "_score": 1
>>
>> Also, the mapping is not reflects. I have also tried the following option,
>>
>> {
>> "mappings": {
>> "_id" : {
>> "path" : "docKey"
>> }
>> }
>> }
>>
>> SAMPLE DOCUMENT: Basically a tweet.
>>
>>  {
>>"usrCreatedDate": "2012-01-24 21:34:47",
>>"sex": "U",
>>"listedCnt": 2,
>>"follCnt": 432,
>>"state": "Southampton",
>>"classified": 0,
>>"favCnt": 468,
>>"timeZone": "Casablanca",
>>"twitterId": 47038,
>>"lang": "en",
>>"stnostem": "#ootd #ootw #fashion #styling #photography 
>> #white #pink #playsuit #prada #sunny #spring http://t.co/YbPFrXlpuh";,
>>"sourceId": "tw",
>>"timestamp": "2014-04-09T22:58:00.396Z",
>>"sentiment": 0,
>>"updatedOnGMTDate": "2014-04-09T22:56:57.000Z",
>>"userLocation": "Southampton",
>>"age": 0,
>>"priorityScore": 57.4700012207031,
>>"statusCnt": 14612,
>>"name": "YazzyK",
>>"profilePicUrl": "
>> http://pbs.twimg.com/profile_images/453578494556270594/orsA0pKi_normal.jpeg
>> ",
>>"mentions": "",
>>"sourceStripped": "Instagram",
>>"collectionName": "STREAMING",
>>"tags": "557/161/193/197",
>>"msgid": 1397084280396.33,
>>"_version_": 1464949081784713200,
>>"url2": "{\"urls\":[{\"url\":\"http://t.co/YbPFrXlpuh\
>> ",\"expandedURL\":\"http://instagram.com/p/mliZbgxVZm/\
>> ",\"displayURL\":\"instagram.com/p/mliZbgxVZm/\ 
>> <http://instagram.com/p/mliZbgxVZm/%5C>",\"start\":88,\"end\":110}]}",
>>"links": "http://t.co/YbPFrXlpuh";,
>>"retweetedStatus": "",
>>"twtScreenName": "YazKader",
>>"postId": "454030232501358592",
>>"country": "Bermuda",
>>"message": "#ootd #ootw #fashion #styling #photography 
>> #white #pink #playsuit #prada #sunny #spring http://t.co/YbPFrXlpuh";,
>>"source": "http://instagram.com\"; 
>> rel=\"nofollow\">Instagram",
>>"parentStatusId": -1,
>>"bio": "Live and breathe Fashion. Persian and proud- 
>> Instagram: @Yazkader",
>>"createdOnGMTDate": "2014-04-09T22:56:57.000Z",
>>"searchText": "#ootd #ootw #fashion #styling #photography 
>> #white #pink #playsuit #prada #sunny #spring http://t.co/YbPFrXlpuh";,
>>"isFavorited": "False",
>>"frenCnt": 214,
>>"docKey": "tw_454030232501358592"
>> }
>> Also, how can we create unique mapping for each "TYPE" and not just the 
>> index.
>>
>> Thanks
>>
>

-- 
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/aaa67013-17d7-4c25-a697-65b7cbc4240d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using existing field for mapping

2014-08-03 Thread Ayush
I am new to elastic search, I have created an index "cmn" with a type 
"mention". I am trying to import data from my existing solr to 
elasticsearch, so I want to map an existing field to the _id field.

I have created the following file under /config/mappings/cmn/,

{
"mappings": {
"mentions":{
"_id" : {
"path" : "docKey"
}
  }
}
}

But this doesn't seem to be working, every time I index a record the 
following _id is created,

"_index": "cmn",
"_type": "mentions",
"_id": "k4E0dJr6Re2Z39HAIjYMmg",
"_score": 1

Also, the mapping is not reflects. I have also tried the following option,

{
"mappings": {
"_id" : {
"path" : "docKey"
}
}
}

SAMPLE DOCUMENT: Basically a tweet.

 {
   "usrCreatedDate": "2012-01-24 21:34:47",
   "sex": "U",
   "listedCnt": 2,
   "follCnt": 432,
   "state": "Southampton",
   "classified": 0,
   "favCnt": 468,
   "timeZone": "Casablanca",
   "twitterId": 47038,
   "lang": "en",
   "stnostem": "#ootd #ootw #fashion #styling #photography 
#white #pink #playsuit #prada #sunny #spring http://t.co/YbPFrXlpuh";,
   "sourceId": "tw",
   "timestamp": "2014-04-09T22:58:00.396Z",
   "sentiment": 0,
   "updatedOnGMTDate": "2014-04-09T22:56:57.000Z",
   "userLocation": "Southampton",
   "age": 0,
   "priorityScore": 57.4700012207031,
   "statusCnt": 14612,
   "name": "YazzyK",
   "profilePicUrl": 
"http://pbs.twimg.com/profile_images/453578494556270594/orsA0pKi_normal.jpeg";,
   "mentions": "",
   "sourceStripped": "Instagram",
   "collectionName": "STREAMING",
   "tags": "557/161/193/197",
   "msgid": 1397084280396.33,
   "_version_": 1464949081784713200,
   "url2": 
"{\"urls\":[{\"url\":\"http://t.co/YbPFrXlpuh\",\"expandedURL\":\"http://instagram.com/p/mliZbgxVZm/\",\"displayURL\":\"instagram.com/p/mliZbgxVZm/\",\"start\":88,\"end\":110}]}";,
   "links": "http://t.co/YbPFrXlpuh";,
   "retweetedStatus": "",
   "twtScreenName": "YazKader",
   "postId": "454030232501358592",
   "country": "Bermuda",
   "message": "#ootd #ootw #fashion #styling #photography 
#white #pink #playsuit #prada #sunny #spring http://t.co/YbPFrXlpuh";,
   "source": "http://instagram.com\"; 
rel=\"nofollow\">Instagram",
   "parentStatusId": -1,
   "bio": "Live and breathe Fashion. Persian and proud- 
Instagram: @Yazkader",
   "createdOnGMTDate": "2014-04-09T22:56:57.000Z",
   "searchText": "#ootd #ootw #fashion #styling #photography 
#white #pink #playsuit #prada #sunny #spring http://t.co/YbPFrXlpuh";,
   "isFavorited": "False",
   "frenCnt": 214,
   "docKey": "tw_454030232501358592"
}
Also, how can we create unique mapping for each "TYPE" and not just the 
index.

Thanks

-- 
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/15c33940-d95c-48b4-afcd-a3cccdabafaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ElasticSearch is down

2014-06-18 Thread Ayush
Up and running now.


On Wednesday, June 18, 2014 4:50:49 PM UTC-4, Ayush Sangani wrote:
>
> Thanks Leslie.
>
> Looks like I have been playing a lot with aggregations.. :P :)
>
> -Ayush Sangani
>
> On Wednesday, June 18, 2014 4:48:37 PM UTC-4, Leslie Hawthorn wrote:
>>
>> Known issue and we're looking into it. Thanks for the bug report. 
>> We'll post here when we're back to live. 
>>
>>
>> Cheers, 
>> LH 
>>
>> On Wed, Jun 18, 2014 at 10:45 PM, ElasticRabbit  
>> wrote: 
>> >  Just a note..!! 
>> > 
>> > -- 
>> > 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 elasticsearc...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/elasticsearch/7b75925c-3da7-4397-b33b-a4b2ea329fbe%40googlegroups.com.
>>  
>>
>> > For more options, visit https://groups.google.com/d/optout. 
>>
>>
>>
>> -- 
>> Leslie Hawthorn 
>> Community Manager 
>> http://elasticsearch.com 
>>
>> Other Places to Find Me: 
>> Freenode: lh 
>> Twitter: @lhawthorn 
>> Skype: mebelh 
>> Voice: +31 20 794 7300 
>>
>

-- 
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/ad48ba6d-7cae-48a3-a0b0-2a670ba957b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrade cluster from 0.90.11 to 1.1.1

2014-06-10 Thread Ayush Sangani
Hi Thomas,

I am following the same steps as you listed.
I had one query I would be thankful if you can help me out.

After copying the data and config folder to the latest elasticsearch 
version when I restart the elasticsearch 1.1.1 server,
I see two nodes in the same cluster(instead of one). 
Can you tell me how this second node is created?

Thanks,
Ayush

On Saturday, April 26, 2014 3:20:37 AM UTC-4, Thomas Ardal wrote:
>
> I'm running a two-node cluster with Elasticsearch 0.90.11. I want to 
> upgrade to the newest version (1.1.1), but I'm not entirely sure on how to 
> do it. 0.90.11 is based on Lucene 4.6.1 and 1.1.1 on Lucene 4.7.2. Can I do 
> the following:
>
> 1. stop node 1.
> 2. install 1.1.1 on node 1.
> 3. copy data folder to 1.1.1.
> 4. start node 1 and wait for it to synchronize.
> 5. stop node 2.
> 6. install 1.1.1 on node 2.
> 7. copy data folder to 1.1.1.
> 8. start node 2 and wait for it to synchronize.
>
> I can live with downtime if not possible otherwise.
>

-- 
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/a4e443f4-feec-44fd-afcc-41e231885f3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.