timestamp

2014-02-10 Thread Khoa Nguyen
Here's my finding on the _timestamp field.


curl -XPOST 'localhost:9200/bam' -d '{
mappings : {
_default_ : {
_timestamp: { enabled : true }
}
}
}
}'


curl -XPOST 'localhost:9200/bam/bam/' -d '{
bam : bam
}'


curl 'localhost:9200/bam/_search?fields=_source,_timestamppretty'

{

  took : 1,

  timed_out : false,

  _shards : {

total : 5,

successful : 5,

failed : 0

  },

  hits : {

total : 1,

max_score : 1.0,

hits : [ {

  _index : bam,

  _type : bam,

  _id : DREzT5VFTe2aJQC5ZRQb2g,

  _score : 1.0, _source : {

bam : bam

}

} ]

  }

}


curl -XPOST 'localhost:9200/bambam' -d '{
mappings : {
_default_ : {
_timestamp: { enabled : true, store : true }
}
}
}
}'


curl -XPOST 'localhost:9200/bambam/bambam/' -d '{
bambam : bambam
}'


curl 'localhost:9200/bambam/_search?fields=_source,_timestamppretty'

{

  took : 1,

  timed_out : false,

  _shards : {

total : 5,

successful : 5,

failed : 0

  },

  hits : {

total : 1,

max_score : 1.0,

hits : [ {

  _index : bambam,

  _type : bambam,

  _id : bDa7LxPBRQaPnoxj6R96dw,

  _score : 1.0, _source : {

bambam : bambam

},

  fields : {

_timestamp : 1392089217844

  }

} ]

  }

}

Is this what you're seeing?

I guess timestamp is being stored somewhere in order for facet and query 
to work. But it is unexpected that without store: true, that no timestamps 
are returned in result.

-- 
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/0b1dff20-aacd-405c-8db8-ba19295a8f89%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Add extra stopwords

2014-01-15 Thread Khoa Nguyen
whole purpose is to remove stopword from appearing in term facets

On Wednesday, 15 January 2014 19:10:49 UTC+11, Khoa Nguyen wrote:

 *Environment  setup*

   Mac OSX
   ES 0.90.7  installed via homebrew

 *Steps*

 update config

   # /usr/local/Cellar/elasticsearch/0.90.7/config/elasticsearch.yml
   # add more Stopwords to default standard analyzer
   index:
 analysis:
   analyzer:
 standard:
   type: standard
   stopwords: [http, t.co]

 restart ES

 curl -XGET 'localhost:9200/_analyze?analyzer=standardpretty' -d 'this is 
 a test http'

 = {

   tokens : [ {

 token : test,

 start_offset : 10,

 end_offset : 14,

 type : ALPHANUM,

 position : 4

   }, {

 token : http,

 start_offset : 15,

 end_offset : 19,

 type : ALPHANUM,

 position : 5

   } ]

 }

 *Expectation*

 http shouldn't not be indexed


 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/315e5894-8501-4d4c-9523-7eb049893930%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.