Giter Site home page Giter Site logo

Elasticsearch 7 Mapping about elastix HOT 7 OPEN

werbitzky avatar werbitzky commented on July 20, 2024
Elasticsearch 7 Mapping

from elastix.

Comments (7)

costa avatar costa commented on July 20, 2024 1

Well... it's worth noting this is not the only change needed for ES7 support: Elastix.Search.search, Elastix.Document.index, Elastix.Document.delete and others have to have "type" arguments removed — for now, giving "_doc" for the latter seems to work around that.

from elastix.

gabriel137 avatar gabriel137 commented on July 20, 2024

I ended up finding a way, just do the process of inserting the data and the attributes will be created automatically

Elastix.Document.index (elastic_url, "twitter", "_doc", "1", date)

But now I'm trying to find out how to search for a file that looks like it has been changed too.

from elastix.

nilcolor avatar nilcolor commented on July 20, 2024

Mapping.put(url, index_name, type, mapping, include_type_name: true) should work.

from elastix.

gabriel137 avatar gabriel137 commented on July 20, 2024

Changed, now is like this:

Elastix.Document.index (elastic_url, "twitter", "_doc", "1", date)

from elastix.

sb8244 avatar sb8244 commented on July 20, 2024

I made a very basic module based on Elastix.Mapping that works to create an index in 7 without warnings:

defmodule Elastix.NewMapping do
  import Elastix.HTTP, only: [prepare_url: 2]
  alias Elastix.{HTTP, JSON}

  def put(elastic_url, index_name, data) do
    prepare_url(elastic_url, "/#{index_name}/_mapping")
    |> HTTP.put(JSON.encode!(data))
  end
end

Elastix.NewMapping.put(elastic_url, "search", %{
  properties: %{
    content: %{type: "search_as_you_type"}
  }
})

from elastix.

costa avatar costa commented on July 20, 2024

@sb8244 Thanks, your workaround works.
Waiting for this to be resolved in the package.

from elastix.

mruoss avatar mruoss commented on July 20, 2024

Is it planned to support Elasticsearch 8? (mapping types are not supported anymore)

from elastix.

Related Issues (19)

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.