What indexes are created when indexing a document in elasticsearch -


if create first document of it's type, or put mapping, index created each field?

obviously if set "index" "analyzed" or "not analyzed" field indexed.

is there way store field can retrieved never searched by? imagine save lot of space? if set "no" save space?

will still able search this, take more time, or totally unsearchable?

is there way make field indexed after documents inserted , change mind?

for example, might have mapping:

{  "book":{"properties":{      "title":{"type":"string", "index":"not_analyzed"},      "shelf":{"type":"long","index":"no"} }}} 

so want able search title, retrieve shelf book on

index:no indeed not create index field, saves space. once you've done can't search particular field anymore.

perhaps useful in context know aboutthe _source field, returned default , includes fields you've stored. http://www.elasticsearch.org/guide/reference/mapping/source-field/

as second question: can't change mind halfway. when want index particular field later on have reindex documents.

that's why may want reconsider setting index:no, etc. in fact strategy begin don't define schema fields @ all, unless you're 100% sure need non-default analyzer particular field instance. otherwise es use usable defaults.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -