A simple demo showing how simple it is to use elasticsearch 2.x with express.js.
You can read the blog post at https://blog.raananweber.com/2015/11/24/simple-autocomplete-with-elasticsearch-and-node-js/
start the app with:
npm start
A simple demo showing how simple it is to use elasticsearch 2.x with express.js
Home Page: https://blog.raananweber.com/2015/11/24/simple-autocomplete-with-elasticsearch-and-node-js/
License: MIT License
A simple demo showing how simple it is to use elasticsearch 2.x with express.js.
You can read the blog post at https://blog.raananweber.com/2015/11/24/simple-autocomplete-with-elasticsearch-and-node-js/
start the app with:
npm start
Hi when I run npm start I get this error.
InvalidTypeNameException[mapping type name [mapping] can't start with '']
Do you have any insight?
$ npm start
[email protected] start /Users/sugizo/js/learn/express.js-elasticsearch-autocomplete
node ./bin/www
Elasticsearch INFO: 2017-11-21T03:21:53Z
Adding connection to http://localhost:9200/
Unhandled rejection Error: Incorrect HTTP method for uri [/randomindex] and method [POST], allowed: [PUT, DELETE, GET, HEAD]
at respond (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/elasticsearch/src/lib/transport.js:264:15)
at checkRespForFailure (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/elasticsearch/src/lib/transport.js:223:7)
at HttpConnector. (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/elasticsearch/src/lib/connectors/http.js:155:7)
at IncomingMessage.wrapper (/Users/sugizo/js/learn/express.js-elasticsearch-autocomplete/node_modules/lodash/index.js:3095:19)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
When I run this demo I get this error:
(node:1695) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [mapper_parsing_exception] Mapping definition for [suggest] has unsupported parameters: [payloads : true] :: {"path":"/randomindex/_mapping/document","query":{},"body":"{"properties":{"title":{"type":"string"},"content":{"type":"string"},"suggest":{"type":"completion","analyzer":"simple","search_analyzer":"simple","payloads":true}}}","statusCode":400,"response":"{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Mapping definition for [suggest] has unsupported parameters: [payloads : true]"}],"type":"mapper_parsing_exception","reason":"Mapping definition for [suggest] has unsupported parameters: [payloads : true]"},"status":400}"}
(node:1695) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Elasticsearch ERROR: 2016-02-13T14:29:11Z
Error: Request error, retrying -- connect ECONNREFUSED 127.0.0.1:9200
i have an error when i start it project may be i need to install something to make it works!
the same problem when i install the last elasticsearch.
please help if you can!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.