This post is more than 5 years old
8 Posts
0
2576
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
chris_arnett
110 Posts
0
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.
rbala1
222 Posts
1
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.
chris_arnett
110 Posts
1
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.
BiggyAQL
8 Posts
0
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
rbala1
222 Posts
0
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.
BiggyAQL
8 Posts
0
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?![](https://prod-care-community-cdn.sprinklr.com/community/687062f5-603c-4f5f-ab9d-31aa7cacb376/ReAtmossearchbyobjectmetadata-c236509c-7dd3-41eb-885a-b7c1226c0c67-1746123176)
Alternatively should I create a database where to store the values of the tag and the objectId.![](https://prod-care-community-cdn.sprinklr.com/community/687062f5-603c-4f5f-ab9d-31aa7cacb376/ReAtmossearchbyobjectmetadata-1f9a5621-8ec1-4104-846d-352480fd7c24-1746123176)
BiggyAQL
8 Posts
0
February 5th, 2013 12:00
Thank you,![](https://prod-care-community-cdn.sprinklr.com/community/687062f5-603c-4f5f-ab9d-31aa7cacb376/ReAtmossearchbyobjectmetadata-d754d4a9-241f-4185-8db0-6db5c02a7dd6-1746123176)
use recently atmos and your information is valuable,
I will use a database for the search
Have a nice day.
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
0
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.