Git Product home page Git Product logo

Comments (8)

sksamuel avatar sksamuel commented on June 18, 2024

Are you talking about _source: enabled ?

from elastic4s.

richardhundt avatar richardhundt commented on June 18, 2024

No, I really mean the "enabled" field in the core type:

{
   "mappings": {
    "whatever": {
      "type": "object",
      "enabled": false
    }
  }
}

What setting the value to false does is disable parsing and analysis so that you can store arbitrary JSON values.

from elastic4s.

sksamuel avatar sksamuel commented on June 18, 2024

Can you link me to docs on that, and I'll get it added.

from elastic4s.

richardhundt avatar richardhundt commented on June 18, 2024

You're fast :-)

You'll need to scroll down a bit:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-object-type.html

An example of where it's used internally is in the _percolator index to store the query. It's not the same as dynamic in that it generates no schema, so you don't get conflicts if you first try to store a JSON object in one document, and then a string in another for a field flagged with "enabled": false.

from elastic4s.

sksamuel avatar sksamuel commented on June 18, 2024

Will add all those missing fields.

from elastic4s.

fehmicansaglam avatar fehmicansaglam commented on June 18, 2024

@richardhundt is this issue still present?

from elastic4s.

sksamuel avatar sksamuel commented on June 18, 2024

This should be fixed now, closing.

from elastic4s.

yonran avatar yonran commented on June 18, 2024

I think this is still open. You can disable a particular field createIndex(indexName).mappings(mapping("_doc").fields(objectField("o").enabled(false)), but I don’t think you can disable indexing all fields of the document e.g. createIndex(indexName).mappings(mapping("_doc").enabled(false)). Elasticsearch documentation: mapping enabled

from elastic4s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.