Generic question

I have resources that I need to index, they look like the below, I
index this into index "managedobject" and type as "host" using ../
managedobject/host

{
"xmlns:base":"http://ontologies.domain.com//base/2009/08/base",
"xmlns:host":"http://ontologies.domain.com//base/2009/08/host",
"base:DisplayName":"Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:LastUpdated":1335366724956,
"base:LastUpdatedDateTime":"2012-04-25T11:12:04.956-0400",
"base:Model":"PowerEdge 1565",
"base:Name":"Host-960a8b54ecb34475a3d9b508738cc1fa.lss.domain.com",
"base:Identifier":"tag:@domain.com,
2011:host:Host::Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa.lss.domain.com",
"base:Identifier":"10.226.214.73",
"base:Status":"OK",
"base:Vendor":"Dell Inc.",
"base:discoveryStatus":"Success",
"host:CPUSpeed":"0.29 Ghz",
"host:CPUType":"Intel(R) Xeon(R) CPU E5410 @ 2.33GHz",
"host:CreatedBy":"Discovery",
"host:FQDN":"Host-960a8b54ecb34475a3d9b508738cc1fa.lss.domain.com",
"host:MultipathVersion":"4.7",
"host:NumberOfCPUs":"4 x 1.08 Ghz Intel(R) Xeon(R) CPU E5410 @
2.33GHz",
"host:OperatingSystemVersion":"4.7",
"host:PhysicalMemorySize":"304798513",
"host:ShortName":"Host-960a8b54ecb34475a3d9b508738cc1fa",
"host:VersionSolutionEnabler":"7.7"
}

My question is, to get a best performance do I keep the document
structure the same or make some change to this representation?

It depends on how you want to query this data later.

"base:Identifier":"tag:@domain.com,
2011:host:Host::Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa.lss.domain.com",

My question is, to get a best performance do I keep the document
structure the same or make some change to this representation?

Also, the above is not legal JSON, as you cannot repeat key names.
Elasticsearch will actually index the above just fine, but if you are
retrieving this _source docs from Elasticsearch, there is a good chance
that any JSON module that you use will accept only the last value for a
repeated key.

Will a search on any of these Identifer return the same document? If
it does not then I will need to make changes to this document.

On Jun 13, 3:27 pm, Clinton Gormley cl...@traveljury.com wrote:

"base:Identifier":"tag:@domain.com,
2011:host:Host::Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa.lss.domain.com",
My question is, to get a best performance do I keep the document
structure the same or make some change to this representation?

Also, the above is not legal JSON, as you cannot repeat key names.
Elasticsearch will actually index the above just fine, but if you are
retrieving this _source docs from Elasticsearch, there is a good chance
that any JSON module that you use will accept only the last value for a
repeated key.

On Wed, 2012-06-13 at 03:59 -0700, ajan wrote:

Will a search on any of these Identifer return the same document? If
it does not then I will need to make changes to this document.

It will return exactly what you sent it. So if your receiving code can
handle illegal JSON, then you'll be fine

clint

On Jun 13, 3:27 pm, Clinton Gormley cl...@traveljury.com wrote:

"base:Identifier":"tag:@domain.com,
2011:host:Host::Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa",
"base:Identifier":"Host-960a8b54ecb34475a3d9b508738cc1fa.lss.domain.com",
My question is, to get a best performance do I keep the document
structure the same or make some change to this representation?

Also, the above is not legal JSON, as you cannot repeat key names.
Elasticsearch will actually index the above just fine, but if you are
retrieving this _source docs from Elasticsearch, there is a good chance
that any JSON module that you use will accept only the last value for a
repeated key.