Code Monkey home page Code Monkey logo

Comments (4)

jordansissel avatar jordansissel commented on June 27, 2024 2

As a workaround, you can use single quotes:

query => 'type:start AND operation:"%{[opid]}"'

from logstash-filter-elasticsearch.

v01t avatar v01t commented on June 27, 2024 1

@jordansissel your workaround doesn't work in my case:
query => '{"query":{"bool":{"must":[{"match":{"_type":{"query":"shares","type":"phrase"}}},{"range":{"date_start":{"lte":"%{[ts_date]}"}}},{"range":{"date_end":{"gt":"%{[ts_date]}"}}},{"match":{"carrier":{"query":"%{[carrier]}","type":"phrase"}}},{"match":{"market":{"query":"%{[market]}","type":"phrase"}}},{"match":{"content_type":{"query":"%{[content_type]}","type":"phrase"}}}]}}}'

:error=>#<Elasticsearch::Transport::Transport::Errors::BadRequest: [400] { error":{"root_cause":[{"type":"query_parsing_exception","reason":"Failed to parse query [{\"query\":{\"bool\":{\"must\":[{\"match\":{\"_type\":{\"query\":\"shares\",\"type\":\"phrase\"}}},{\"range\":{\"date\":{\"lte\":\"2016-07-15\"}}},{\"range\":{\"date_end\":{\"gt\":\"2016-07-15\"}}},{\"match\":{\"carrier\":{\"query\":\"carrier-1\",\"type\":\"phrase\"}}},{\"match\":{\"market\":{\"query\":\"market-0\",\"type\":\"phrase\"}}},{\"match\":{\"content_type\":{\"query\":\"content-0\",\"type\":\"phrase\"}}}]}}}]","index":"sys"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"sys","node":"nyR9DmsxTmimTQxvBXZFNQ","reason":{"type":"query_parsing_exception","reason":"Failed to parse query [{\"query\":{\"bool\":{\"must\":[{\"match\":{\"_type\":{\"query\":\"shares\",\"type\":\"phrase\"}}},{\"range\":{\"date\":{\"lte\":\"2016-07-15\"}}},{\"range\":{\"date_end\":{\"gt\":\"2016-07-15\"}}},{\"match\":{\"carrier\":{\"query\":\"telefonica-uk\",\"type\":\"phrase\"}}},{\"match\":{\"market\":{\"query\":\"gcb\",\"type\":\"phrase\"}}},{\"match\":{\"content_type\":{\"query\":\"in-app\",\"type\":\"phrase\"}}}]}}}]","index":"sys","caused_by":{"type":"parse_exception","reason":"Cannot parse '{\"query\":{\"bool\":{\"must\":[{\"match\":{\"_type\":{\"query\":\"shares\",\"type\":\"phrase\"}}},{\"range\":{\"date\":{\"lte\":\"2016-07-15\"}}},{\"range\":{\"date_end\":{\"gt\":\"2016-07-15\"}}},{\"match\":{\"carrier\":{\"query\":\"telefonica-uk\",\"type\":\"phrase\"}}},{\"match\":{\"market\":{\"query\":\"gcb\",\"type\":\"phrase\"}}},{\"match\":{\"content_type\":{\"query\":\"in-app\",\"type\":\"phrase\"}}}]}}}': Encountered \" \"}\" \"} \"\" at line 1, column 77.\nWas expecting one of:\n \"TO\" ...\n <RANGE_QUOTED> ...\n <RANGE_GOOP> ...\n ","caused_by":{"type":"parse_exception","reason":"Encountered \" \"}\" \"} \"\" at line 1, column 77.\nWas expecting one of:\n \"TO\" ...\n <RANGE_QUOTED> ...\n <RANGE_GOOP> ...\n "}}}}]},"status":400}>

any advice?

from logstash-filter-elasticsearch.

muaazsaleem avatar muaazsaleem commented on June 27, 2024

@jordansissel I have been stuck on this for two days, finally your comment is what helped!

from logstash-filter-elasticsearch.

thaibt avatar thaibt commented on June 27, 2024

@v01t Have you ever found a work around for that?

from logstash-filter-elasticsearch.

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.