D
D
Drum Kit2015-06-24 15:40:40
PHP
Drum Kit, 2015-06-24 15:40:40

How to attach a document in elasticsearch?

Nenya has an index and it has a field on which I do not need to implement a search. Documentation says that it can be done with mappng but it doesn't work can you write small examples ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kotofey, 2015-06-24
@arayik

$ curl -XPUT 'http://localhost:9200/{index}/_mapping/{type}' -d '
{
    "{type}" : {
        "properties" : {
            "{field}" : {
                "type" : "{string | date | double | long | boolean}", 
                "index" : "no"
                }
        }
    }
}
'

where
{index} is the name of your index
{type} is your type for the index
{field} is the name of your field that should not be indexed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question