In fact, you can do what you want with ES.
The way I see it is that I prefer store objects that have a common meaning (or source or functionnal sense - I don't know what is the right term) in the same index.
Index are created to define shards and to allow horizontal scaling. You have to know that each shard of an index is a Lucene instance. If you create too much shards on the same node, you will probably hit the "too many open files" issue.
Think index as technical structure. Think type as business docs...
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 4 janv. 2013 à 07:52, Varun Thacker varunthacker1989@gmail.com a écrit :
I do understand your point of view for having a type, but according to me indexing tweets and indexing twitter users should be two different indexes itself thus we could have type mappings as part of the index properties removing the need of a type.
Would you consider this approach as wrong?
On Fri, Jan 4, 2013 at 12:04 PM, David Pilato david@pilato.fr wrote:
If you want to index Tweets from Twitter (search for tweets) and if you want to index Twitter users (search for users), you can create a twitter index with 2 types: tweet and user.
A tweet doesn't have the same properties as a user.
If you want to index also WallPosts from Facebook and Facebook users, you can create a facebook index with two types: post and user.
Make sense?
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 4 janv. 2013 à 07:13, Varun Thacker varunthacker1989@gmail.com a écrit :
Actually on second thought could you give me an example where we need multiple type and it's mappings in a single index?
On Fri, Jan 4, 2013 at 1:43 AM, Varun Thacker varunthacker1989@gmail.com wrote:
Ah I get what type is. Similar to fieldType/field functionality in Solr I guess. Thanks
On Fri, Jan 4, 2013 at 12:48 AM, David Pilato david@pilato.fr wrote:
A type holds the mapping of your document. Within the mapping, you can define analyzers, core objects....
An index holds the settings (basically how many shards and replica...)
Does it answer?
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 3 janv. 2013 à 19:50, Varun Thacker varunthacker1989@gmail.com a écrit :
So I was going through this example on the Index API,
$ curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{
"user" : "kimchy",
}'
So twitter is the name of the index and
tweet is the type.
What does a type represent?
Also is there documentation for users to understand concepts of ES who are coming from a Lucene background? For example the the Parents & Children concept in the Index API guide documentation.
--
--
Regards,
Varun Thacker
http://www.vthacker.in/
--
--
--
--