MapR DB Music Catalog and Indexing - mapr-demos/mapr-music GitHub Wiki

Create Indices for the demonstration:

$ maprcli table index add -path /apps/albums -index idx_language -indexedfields '"language":1'

$ maprcli table index add -path /apps/albums -index idx_name -indexedfields '"name":1'

$ maprcli table index add -path /apps/albums -index idx_released_date -indexedfields '"released_date":-1'

$ maprcli table index add -path /apps/albums -index idx_slug -indexedfields '"slug_name":1,"slug_postfix":1' -includedfields 'name,artists,released_date'

$ maprcli table index add -path /apps/artists -index idx_area -indexedfields '"area":1'

$ maprcli table index add -path /apps/artists -index idx_name -indexedfields '"name":1'

$ maprcli table index add -path /apps/artists -index idx_slug -indexedfields '"slug_name":1,"slug_postfix":1' -includedfields 'name,albums'


List indices:

$ maprcli table index list -path /apps/albums

$ maprcli table index list -path /apps/artists

Delete Indices


$ maprcli table index remove -path /apps/albums -index idx_language

$ maprcli table index remove -path /apps/albums -index idx_name

$ maprcli table index remove -path /apps/albums -index idx_released_date

$ maprcli table index remove -path /apps/albums -index idx_slug 

$ maprcli table index remove -path /apps/artists -index idx_area 

$ maprcli table index remove -path /apps/artists -index idx_name 

$ maprcli table index remove -path /apps/artists -index idx_slug