I am trying to search with the cluster with the algorithm lingo in my query but it is throughing an error

'{"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [search_request].","line":1,"col":19}],"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [search_request].","line":1,"col":19},"status":400}' }

Please show what your data and mapping look like as well as the query that results in this error.

var userDetails = {
search_request: {
_source: ['text.keyword'],
sort: [
created_at: {
order: 'desc'
size: 1000,
query: {
bool: {
must: [
terms: {
'ownedBy.id': [body.ownedById]

  query_hint: '*',
  algorithm: 'lingo',
  max_hits: 0,
  include_hits: false,
  field_mapping: {
    title: ['_source.text'],
    content: ['_source.text'],
    url: ['_source._id']

var urlTemp = 'http://zxxzxzxxxzzzzzzzz/' + 'me' + '/' + '_search'
var options = {
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json'
  uri: urlTemp,
  method: 'POST',
  body: JSON.stringify(userDetails)

code that I am using too but the output '{"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [search_request].","line":1,"col":19}],"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [search_request].","line":1,"col":19},"status":400}' }

That does not look like a valid query format for Elasticsearch. Where does that come from?

I searched the internet and came up with something similar looking related to the Elasticsearch-carrot2 plugin. Is that what you are using? Do you have it correctly installed? If so I would probably recommend you open an issue at that repository or see if they have any mailing list for community. Not sure how many people here have experience with this plugin.

yes, I am using elastic search carrot2 plugin but it is showing the same.

I have no experience using this plugin, so will not be able to help. It might help to mention this in the title though as it will make it easier for someone with experience using this plugin to spot the thread.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.