I am new to ElasticSearch and I was building a simple service that would
store some documents. I used a local node like :
ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder();
Node node = NodeBuilder
Client client = node.client();
I write then plain json docs into one index and assign already an id:
IndexResponse response = client
.prepareIndex(this.index, this.type, "http://www.myID.com")
If I try to retrieve the document by its id everything works fine.
GetResponse response = getClient()
.prepareGet(this.index, this.type, "http://www.myID.com")
// works fine.
However if I want to search (by field), count and retrieve all entries, I always get 0 resutls. My code looks like:
SearchResponse response = getClient()
// 0 hits
I am not sure why this happens? Maybe because the new documents are not indexed and thus not searchable? Or what could be the issue?
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0256f12f-bb8b-49c2-91fc-4159973900aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.