Splunk Search

Join 2 indexes

jwgiblin3
Engager

I have 2 indexes that I am joining and I am getting different results based on whether I start the search with one index vs the other. The join is a one to many relationship

Indexes
- filemeta (1)
- fileacl (*)

Query 1 - 1 Result
index="filemeta" Path="\\server\testshare" | join "Path" [ search index="fileacl" ]
Query 2 - 6 results
index="fileacl" Path="\\server\testshare" | join "Path" [ search index="filemeta" ]

Am I missing something on Query 1 in order to see all the results from the fileacl index?

Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

As you've discovered, the order of a join is significant. The type of join also makes a difference. The default type is inner which means the results do not include events from the main (1st) search that have no matches in the subsearch (2nd). Events that match on both sides are always included.

---
If this reply helps you, Karma would be appreciated.

jwgiblin3
Engager

Thanks for your reply. I do understand inner joins. What I am not clear is why it only included 1 event when there are many events for that path

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...