Thank you. I was searching for the fields which were not present in the 
document. Its my fault.

Thanks,
Vijaya

On Wednesday, December 10, 2014 4:03:11 PM UTC+5:30, David Pilato wrote:
>
> Well. It seems that your documents don’t provide one of the two fields you 
> are searching on.
>
> BTW a full curl/SENSE recreation as a gist would be better to reproduce 
> what you are doing. http://www.elasticsearch.org/help/
>
> -- 
> *David Pilato* | *Technical Advocate* | *Elasticsearch.com 
> <http://Elasticsearch.com>*
> @dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr 
> <https://twitter.com/elasticsearchfr> | @scrutmydocs 
> <https://twitter.com/scrutmydocs>
>
>
>  
> Le 10 déc. 2014 à 05:37, Vijayakumari B N <[email protected] 
> <javascript:>> a écrit :
>
> Hi,
>
> I am getting the empty response from elastic search server. Below is the 
> POC which i had written.
>
> For creating index i used 
>
>  client.index(new IndexRequest("incident", "incident", 
> (incident.getIrId()+"")).source(bytes)).actionGet();
>
> i am able to see the below data loaded to elastic search server
>
> index {[incident][incident][1], 
> source[{"id":1,"optlock":0,"creationDate":1418116380611,"problem":null,"hidden":false,"irId":576956,"incidentDate":null,"description":null,"environment":"PRODUCTION","maxSeverity":"NONE","status":"REQUESTED","reviewedByServiceDelivery":false,"mgmtEmailSent":false,"draftEmailSent":false,"ownerGroup":null,"owner":null,"reportCount":0,"irLoggerGroup":null,"irLoggerName":null,"irOwnerGroup":null,"irOwnerName":null,"summary":"<strong>Executive
>  
> Summary:</strong> <br/><br/><strong>What happened?</strong> 
> <br/><br/><strong>How was the incident identified?</strong> 
> <br/><br/><strong>Who was impacted?</strong> <br/><br/><strong>For how 
> long?</strong> <br/><br/><strong>How was Service restored?</strong> 
> <br/><br/><strong>What is believed to have Caused the Incident?</strong> 
> <br/><br/>","ihrFeedback":null,"pmrFeedback":null,"nonOperational":false,"symptom":"diwali","ifText":null,"thenText":null,"keywords":"new
>  
> year","incidentIhrFeedback":null,"sii":0.0,"currentLogEntry":null,"ownerId":0,"detectionTime":0,"diagnosisTime":0,"totalIncidentTime":0,"detectionTimeSiv":0.0,"diagnosisTimeSiv":0.0,"recoveryTimeSiv":0.0,"affectedCustServices":[],"eventsIEC50IEC55":[],"eventsNotIEC50IEC55":[],"detectedByGroup":"-","detectionEvents":[],"diagnosedByGroup":"-","diagnosisEvents":[],"recoveredByGroup":"-","recoveryEvents":[],"ownerGroupId":0,"ownerGroupName":null,"ownerFullName":null,"recoveryTime":0,"serviceManagerOwnershipTime":-1,"serviceManagerOwnershipEvents":[],"eventsIEC50IEC55WithCiActivityOutcome":[],"shift":""}]}
>
>
>
> index {[incident][incident][2], 
> source[{"id":2,"optlock":0,"creationDate":1418116444243,"problem":null,"hidden":false,"irId":482550,"incidentDate":null,"description":null,"environment":"PRODUCTION","maxSeverity":"NONE","status":"REQUESTED","reviewedByServiceDelivery":false,"mgmtEmailSent":false,"draftEmailSent":false,"ownerGroup":null,"owner":null,"reportCount":0,"irLoggerGroup":null,"irLoggerName":null,"irOwnerGroup":null,"irOwnerName":null,"summary":"<strong>Executive
>  
> Summary:</strong> <br/><br/><strong>What happened?</strong> 
> <br/><br/><strong>How was the incident identified?</strong> 
> <br/><br/><strong>Who was impacted?</strong> <br/><br/><strong>For how 
> long?</strong> <br/><br/><strong>How was Service restored?</strong> 
> <br/><br/><strong>What is believed to have Caused the Incident?</strong> 
> <br/><br/>","ihrFeedback":null,"pmrFeedback":null,"nonOperational":false,"symptom":null,"ifText":null,"thenText":null,"keywords":"new
>  
> year 
> 2","incidentIhrFeedback":null,"sii":0.0,"currentLogEntry":null,"ownerId":0,"detectionTime":0,"diagnosisTime":0,"totalIncidentTime":0,"detectionTimeSiv":0.0,"diagnosisTimeSiv":0.0,"recoveryTimeSiv":0.0,"affectedCustServices":[],"eventsIEC50IEC55":[],"eventsNotIEC50IEC55":[],"detectedByGroup":"-","detectionEvents":[],"diagnosedByGroup":"-","diagnosisEvents":[],"recoveredByGroup":"-","recoveryEvents":[],"ownerGroupId":0,"ownerGroupName":null,"ownerFullName":null,"recoveryTime":0,"serviceManagerOwnershipTime":-1,"serviceManagerOwnershipEvents":[],"eventsIEC50IEC55WithCiActivityOutcome":[],"shift":""}]}
>
> When i tried to search for text in indexed data with simple query string :
>
> SearchResponse response = client.prepareSearch("incident")
>                 .setTypes("incident")
>                 .setQuery(query)
>                 .setFrom(from)
>                 .setSize(size)
>                 .execute().actionGet();
>
> {
>   "query" : {
>     "simple_query_string" : {
>       "query" : "new year",
>       "fields" : [ "symptomField", "keywordsField" ]
>     }
>   }
> }
>
> i get below response
>
> {
>   "took" : 1,
>   "timed_out" : false,
>   "_shards" : {
>     "total" : 5,
>     "successful" : 5,
>     "failed" : 0
>   },
>   "hits" : {
>     "total" : 0,
>     "max_score" : null,
>     "hits" : [ ]
>   }
> }
>
> Can someone please guide me where i am doing wrong, why elastic server is 
> not able to fetch results.
>
> Thanks in Advance,
> Vijaya
>
> -- 
> 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 [email protected] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/5038a985-8aa2-43af-b9ab-ae64b2e75f44%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/elasticsearch/5038a985-8aa2-43af-b9ab-ae64b2e75f44%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/ba8bc30a-c2b4-4bee-b0c1-6cf56f9337d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to