Hello  ,

There is a ids query , that might be helpful here.

LINK -
http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html

Also a direct query on _id is working for me -


{
  "query": {
    "query_string": {
      "query": "_id:1116275896960111667sdsd7328349520"
    }
  }
}

Thanks
           Vineeth Mohan,
           Elasticsearch consultant,
           qbox.io ( Elasticsearch service provider <http://qbox.io/>)


On Fri, Apr 3, 2015 at 8:42 PM, <zhangju...@gmail.com> wrote:

> Hi all,
>
> I want to make the _id searchable/retrievable and copy its value to a
> field defined as "_ft".
>
> This is my mapping.
>
> {
>     "_default_": {
>         "dynamic": "true",
>         "_all": {
>             "enabled": false
>         },
>          "_id" : {
>             "index" : "not_analyzed",
>             "store" : true,
>             "copy_to": "_ft"
>         },
>         "properties": {
>             "document": {
>                 "properties": {
>                     "_ft": {
>                         "type": "string",
>                         "analyzer": "icu"
>                     }
>             }
>        }
> }
>
> However, I noticed that after applying this mapping, the _id is still not
> searchable.
>
> To be clear, I want to use the Query String mode to search in the _ids as
> well.
>
> Is this possible and how should my mapping look like in order to support
> this?
>
> Cheers,
> /JZ
>
>  --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/62d79125-a04a-4314-b3b2-d32b7b5b9ca7%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/62d79125-a04a-4314-b3b2-d32b7b5b9ca7%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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5mk0xrzAdkuRyeP6_n6nYearPccOECcpUo2uB_6pJwpPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to