WHere the query is really pointing to the index I created.
So the problem is that if i run this like this
1. Create index 2. Execute query
I get 0 results back BUT if I run it like this
1. Create Index 2. Thread.sleep(1000) 3. Execute query
I get 1 result back.
So of cause this has to have something to do with the files being taken away between running each test bacus eif I keep them around it works without the sleep. Is there some sort of synchronization or transaction status I need to check after creating the index to be guaranteed it is in the storage BEFORE executing the query ?
There is a near-realtime aspect to ES. What this means is by default, documents are searchable within 1 second (refresh interval) after they are indexed. You may index a document and explicitly refresh it immediately in which case, you can search for it immediately. For example: