I have the following document in my index -
{
"_index" : "supplier",
"_type" : "0000016920",
"_id" : "37053.5138.32768.19768",
"_version" : 1,
"exists" : true, "_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}
}
When I search for documents that starts with a*, I am not finding this
document in my search results.
http://localhost:9200/supplier/0000016920/_search?q=name:a*&pretty=true
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "supplier",
"_type" : "0000016920",
"_id" : "37053.5138.23591.11163",
"_score" : 1.0, "_source" : {"type":"Historical ATL Part","name":"A70-04-23800","revision":"","description":"ADAPTER,MPTEE","current":"History","kindof":"Part"}
} ]
}
}
Instead of the above query, if I
try http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true
I get the document in my result..
{
"took" : 18,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 4.091176,
"hits" : [ {
"_index" : "supplier",
"_type" : "0000016920",
"_id" : "37053.5138.32768.19768",
"_score" : 4.091176, "_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}
} ]
}
}
I must be doing something stupid.. please tell me how to get this document
["name":"A-0160-0163-1"] in my result set.
Here is my mapping:
"0000016920" : {
"properties" : {
"current" : {
"type" : "string"
},
"description" : {
"type" : "string"
},
"kindof" : {
"type" : "string"
},
"name" : {
"type" : "string",
"store" : "yes"
},
"revision" : {
"type" : "string"
},
"type" : {
"type" : "string"
}
}
}
Thanks
--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.