Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

think_elasticsearch

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think_elasticsearch - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

13

exmple/model/lib/book.js

@@ -37,5 +37,18 @@ 'use strict';

this._mapping = {
userid: {
type: 'string'
},
username: {
type: 'string'
},
source: 'string',
info: {
idNo: { type: 'string' },
real_name: { type: 'string' },
address: { type: 'string' },
phonenum: { type: 'string' },
email: { type: 'string' },
qq: { type: 'string' },
wechat_unionid: { type: 'string' }, //微信unionid
sina_weibo: { type: 'string' } },
create_time: {

@@ -42,0 +55,0 @@ type: 'second'

@@ -16,5 +16,19 @@ /**

this._mapping = {
userid: {
type: 'string'
},
username: {
type: 'string'
},
source: 'string',
info: {
idNo: {type: 'string'},
real_name: {type: 'string'},
address: {type: 'string'},
phonenum: {type: 'string'},
email: {type: 'string'},
qq: {type: 'string'},
wechat_unionid: {type: 'string'},//微信unionid
sina_weibo: {type: 'string'},//新浪微博
},
create_time: {

@@ -21,0 +35,0 @@ type: 'second'

6

lib/esmodel.js

@@ -52,2 +52,6 @@ 'use strict';

for (var map in mapping) {
if (_lib2.default.isString(mapping[map]) && _lib2.default.isEmpty(mapping[map].type)) {
delete mapping[map];
continue;
}
switch (mapping[map].type) {

@@ -68,3 +72,3 @@ case 'second':

//子对象,需要进一步解析
mapping[map] = { properties: parseMap(map) };
mapping[map] = { properties: parseMap(mapping[map]) };
break;

@@ -71,0 +75,0 @@ case 'string':

2

package.json
{
"name": "think_elasticsearch",
"version": "1.0.0",
"version": "1.0.1",
"description": "基于elasticsearch.js的elasticsearch工具",

@@ -5,0 +5,0 @@ "scripts": {

@@ -10,2 +10,6 @@ /**

for (let map in mapping) {
if (lib.isString(mapping[map]) && lib.isEmpty(mapping[map].type)) {
delete mapping[map]
continue;
}
switch (mapping[map].type) {

@@ -22,3 +26,3 @@ case 'second'://10位时间戳

case undefined://子对象,需要进一步解析
mapping[map] = {properties: parseMap(map)};
mapping[map] = {properties: parseMap(mapping[map])};
break;

@@ -25,0 +29,0 @@ case 'string'://默认不进行Analysis not_analyzed

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc