Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

2558

February 5th, 2013 06:00

Atmos search by object metadata

Hi,

with java api I have uploaded an object (file1.txt) and set this listable user metadata:

customer=Company 1

typology=billing

year=2013

number=123456

Can I retrieve objects researching for the value of the tag?

Example i want all objects where value of tag "customer" equals "Company 1"

It's possible?

Thanks

110 Posts

February 5th, 2013 12:00

You can only list a single tag (either for sub-tags or for objects).  Atmos is first and foremost an object store, not a database.  Generally speaking, if you require complex searching, then yes, you should put your metadata in a separate database and store the object identifier there.  The vast majority of customers do this.

However, many of our customers also asign one or two listable tags to their objects so they may be located by a 3rd party tool, for debugging, or just in case their primary database fails for some reason so they can re-associate the objects.

To my knowledge there is no current plan to add key-value searching as a feature of Atmos.

222 Posts

February 5th, 2013 06:00

Unfortunately, it's not possible to list objects by their metadata values.  Only keys can be used to list objects.

110 Posts

February 5th, 2013 07:00

Instead of assigning a value to the listable tag, you can provide a hierarchy.  I.e.

customer/Company 1

typology/billing

etc... Then you can search for all "customers" by using

atmosApi.listMetadata( "customer" );

- or -

esuApi.getListableTags( "customer" );

You can also search for objects under a specific customer by calling

atmosApi.listObjects( new ListObjectsRequest().metadataName( "customer/Company 1" ) );

- or -

esuApi.listObjects( "customer/Company 1", options );

Be sure to read the notes on ListOptions to make sure you get all the results back.

To read back an object stored in the namespace, use

byte[] data = atmosApi.readObject( new ObjectPath( "/billing/2013/file1.txt" ), byte[].class );

- or -

byte[] data = esuApi.readObject( new ObjectPath( "/billing/2013/file1.txt" ), null, null );

The new AtmosApi is generic, so you can specify the object type you want (byte[], String, etc.) in the readObject() call.  EsuApi is deprecated as of 2.1.

8 Posts

February 5th, 2013 07:00

is possible in the future?

and another question:

i have stored file in namespace path: /billing/2013/file1.txt

How can I get the object from the path?

exist a method using the java API? Es. getObject("/billing/2013/file1.txt")

Thanks

222 Posts

February 5th, 2013 07:00

It appears that the readObject() method may be what you're looking for.  readObject() takes an id parameter that can be of type ObjectPath.

8 Posts

February 5th, 2013 11:00

Hi Chris,

thanks for the reply.


I'll try with your solutions.

I think the concept of associating many tags is only useful if you can search for multiple tags, my company needs to store more than 10ml files relating to 700,000 customers and create many subtag is not powerful.

In the roadmap of EMC2 is scheduled this option?

Alternatively should I create a database where to store the values ​​of the tag and the objectId.


8 Posts

February 5th, 2013 12:00

Thank you,
use recently atmos and your information is valuable,
I will use a database for the search

Have a nice day.

5 Practitioner

 • 

274.2K Posts

February 6th, 2013 00:00

In general Atmos is intended for Object Storage - not for database or indexing - and do not expect that to change.

If you need sophisticated search and index capabilities then that is best handled externally on software designed to optimise that function

Regards

Adriaan Serfontein

SATC MidTier PreSales

+4477 696 48326

By phone, so short, hopefully not abrupt.

No Events found!

Top