Archive

how to display common results from two index

tp92222
Explorer

Hi,
i have 2 indexes
index=abc & index=xyz

Index abc has following values

ID.......Type Name class Address
001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
003....B.......Tom......11A...UK
004....C.......Ram......12B...India
004....A.......Ron......12B...UAE

Index XYZ has following values

ID.......Type Name class Address
001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
004....D.......Ram......12B...India
004....A.......Ron......12B...UAE

It should return result where exact match found in both index for ID AND Type

Desired result

001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
004....A.......Ron......12B...UAE

Thank you

Tags (1)
0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust

index=abc [search index=xyz | dedup ID Type | fields ID Type]

also

index=abc | join type=inner max=0 ID Type [search index=xyz]

View solution in original post

0 Karma

jkat54
SplunkTrust
SplunkTrust

index=abc [search index=xyz | dedup ID Type | fields ID Type]

also

index=abc | join type=inner max=0 ID Type [search index=xyz]

View solution in original post

0 Karma

tp92222
Explorer

Thanks for help

0 Karma
.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!