Ingest Attachment is not working [err: InvalidIndexNameException]


(Nirmal Almara) #1
org.elasticsearch.indices.InvalidIndexNameException: [_ingest] Invalid index name [_ingest], must not start with '_'
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:465)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:85)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:215)
    at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:308)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Above is the error that I got in the log.

I'm using Debian and Installed elastic search through
sudo apt-get update && sudo apt-get install elasticsearch

And I installed the plugin ingest-attachment through
sudo bin/plugin -i ingest-attachment -u https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-5.1.1.zip

The plugin is successfuly installed but it is showing error when I try to ingest attachment like this in python

import requests
import json

payload = json.dumps({
    'description': 'Process documents',
    'processors': [
        {
            'attachment': {
                'field': 'thedata',
                'indexed_chars': -1
            }
        },
        {
            'set': {
                'field': 'attachment.title',
                'value': '{{ title }}'
            }
        },
        {
            'set': {
                'field': 'attachment.page',
                'value': '{{ page }}'
            }
        }
    ]
})

print payload

r = requests.put('http://localhost:9200/_ingest/pipeline/attachment', data=payload)

print r.text

All these are actually working fine in my local macOS setup. But in the server (Debian OS) it's showing the error that I mentioned above.

Thanks!


(David Pilato) #2

Can you check what is coming back on the remote server when you run a simple GET / please?


(Nirmal Almara) #3

I can successfully run and get the result for the simple /GET query :slight_smile:

{
  "status" : 200,
  "name" : "Varnae",
  "version" : {
    "number" : "1.0.3",
   "build_hash" : "NA",
   "build_timestamp" : "NA",
   "build_snapshot" : false,
   "lucene_version" : "4.6"
  },
  "tagline" : "You Know, for Search"
}

(David Pilato) #4

So you have elasticsearch 1.0.3 running.


(system) #6

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