!! Hey filter/ moderator, please do not delete my post!!
Seif,
What is happening is that you need to be consistent between indexing and
searching in terms of "analyzed"
The problem happens because your search "Id": "Id-9829" is case sensitive
in the Id-9829 bit.
One fix is to search on "id-9829"
Another is to create a mapping so that Id is "not_analyzed" then search on
"Id-9829"
Another fix is to use the query: query_string or the query: match. They
will support lucene type matching strings.
Cheers.
On Saturday, April 12, 2014 8:31:37 PM UTC+1, Seif Lotfy wrote:
>
> I am storing my documents as follows:
>
>
> {
> _index: "crash-instances-app1"
> _type: "crash"
> _id: "LmSAjgrvSry2ltvsxAVqcw"
> _source: {
> OsInfo: "osinfo1"
> Exception: "exception1"
> Description: "desc1"
> AppId: "app1"
> StackTraces: "stack1"
> Timestamp: 1395751604
> DeviceInfo: "device91"
> Id: "Id-9829"
> ClientId: "client69"
> CrashId: "crash29"
> }
> }
>
> querying via
>
> {
> "query": {
> "term": {
> "AppId": "app1"
> }
> }
> }
>
> works great and i get this document back, yet querying via
>
> {
> "query": {
> "term": {
> "Id": "Id-9829"
> }
> }
> }
>
>
> return nothing.
>
>
--
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/fdc2a8e8-b9f6-4b37-98a4-d5ee21cb26ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.