@dooy
2017-09-18T13:00:18.000000Z
字数 7095
阅读 192
数据格式
好策
管理 http://es54.jukuu.com
SQL管理 http://es54.jukuu.com/_plugin/sql/
字段 | 类型 | 说明 |
---|---|---|
topic_id | int | 主题id |
book_id | int | 书id |
user_id | int | 用户id |
tag_id | int | 用户类型id |
ctime | 时间格式 | 创建时间 |
title | string | 标题 |
content | string | 内容 |
{"index":{"_id":"28"}}
{"topic_id":28,"book_id":22,"user_id":56,"tag_id":0,"ctime":"2017-08-07T17:03:41+08:00","title":"What Do You Think of Charlotte\uff1f","content":"Charlotte Lucas, a 27-year-old unmarried woman, Elizabeth's good friend, looks flat,with flat family but extraordinary knowledge. Charlotte is very sensible, she clearly knows what she will be in the future, she knows what she wants. For her own marriage, she knows that she can make the best choice, when it comes to love, silently waiting for love; after waiting for lost hope, she can accept the choice of the best results. So when she knew that she is salready a burden which with no money and no prospects to her parents, she marriged with Mr. Collins\uff0cbecause she knows that she should be as happy with him as any other. Not all of us can afford to be romantic. She knows what is best for herself, this is where I appreciate her most."}
环境:java
java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
tomcat版本 apache-tomcat-9.0.0.M26.tar.gz
解压后直接启动
nohup java -jar HaoCeCheckServer.jar > server.log &
配置文件 config.properties
elasticsearch.server=127.0.0.1 #es 服务器
elasticsearch.port=9300 #es 端口
search.threadcnt=4
search.pagecnt=10
minsim=10
rmi.ip=127.0.0.1
rmi.port=8886
将 HaoCeCheckWebService 解压并复制到 tomcat到webapps后面
解压后面的目录是$tomcat_dir/webapps/HaoCeCheckWebService/
启动tomcat
$tomcat_dir/bin/startup.sh
接口:http://127.0.0.1:8080/HaoCeCheckWebService/CheckService
参数:
参数 | 说明 |
---|---|
limit | 显示条数默认是10条 |
user_id | 用户id 用于排除自己 不讲自己的文章算在相似内 |
content | 需要比对的内容 |
curl "http://127.0.0.1:8080/HaoCeCheckWebService/CheckService?limit=10&user_id=1&content=Wendelin+Van+Draanen+is+at+her+best+here+with+a+knockout+cast+of+quirky+characters+and+a+hilarious+series+of++and+missed+opportunities.+But+underlying+the+humor+are+two+teens+in+transition.In+the+book+Pride+and+Prejudice+we+can+find+many+distinctive+characters%2c+like+Mr.+Collins+who+spared+all+his+effort+to+please+Lady+Catherine%2c+an+arrogant+and+selfish+lady%2c+Mrs.+Collins+who+got+married+with+somebody+she+didn%27t+love+but+who+could+provide+her+with+a+steady+life%2c+the+wise+father+Mr.+Bennet%2c+the+naive+and+frivolous+little+girl+Lydia+and+so+on.+Some+people+may+judge+their+behaviour+or+personalities%2c+but+in+my+opinoin%2c+that%27s+every+single+person%27s+right+to+choose+to+be+who+they+want+to+be.+Hope+you+and+me+can+also+find+the+character+we+want+to+act+in+the+movie+named+life.+so+she+urged+Elizebath+to+marry+with+him.+Elizebath+is+enough+brave+to+refuse+her+mother+firmly"
curl -X POST -d "content=Wendelin+Van+Draanen+is+at+her+best+here+with+a+knockout+cast+of+quirky+characters+and+a+hilarious+series+of++and+missed+opportunities.+But+underlying+the+humor+are+two+teens+in+transition.In+the+book+Pride+and+Prejudice+we+can+find+many+distinctive+characters%2c+like+Mr.+Collins+who+spared+all+his+effort+to+please+Lady+Catherine%2c+an+arrogant+and+selfish+lady%2c+Mrs.+Collins+who+got+married+with+somebody+she+didn%27t+love+but+who+could+provide+her+with+a+steady+life%2c+the+wise+father+Mr.+Bennet%2c+the+naive+and+frivolous+little+girl+Lydia+and+so+on.+Some+people+may+judge+their+behaviour+or+personalities%2c+but+in+my+opinoin%2c+that%27s+every+single+person%27s+right+to+choose+to+be+who+they+want+to+be.+Hope+you+and+me+can+also+find+the+character+we+want+to+act+in+the+movie+named+life.+so+she+urged+Elizebath+to+marry+with+him.+Elizebath+is+enough+brave+to+refuse+her+mother+firmly" "http://127.0.0.1:8080/HaoCeCheckWebService/CheckService?limit=1&user_id=47"
应答体
[
{
"book_id": "98",
"ctime": "2017-08-20T10:31:47+08:00",
"lcontent": "<font color='red' id=0>Wendelin Van Draanen is at her best here with a knockout cast of quirky characters and a hilarious series of </font><font color='red' id=1> and missed opportunities.</font><font color='red' id=2> But underlying the humor are two teens in transition.</font>In the book Pride and Prejudice we can find many distinctive characters, like Mr. Collins who spared all his effort to please Lady Catherine, an arrogant and selfish lady, Mrs. Collins who got married with somebody she didn't love but who could provide her with a steady life, the wise father Mr. Bennet, the naive and frivolous little girl Lydia and so on. Some people may judge their behaviour or personalities, but in my opinoin, that's every single person's right to choose to be who they want to be. Hope you and me can also find the character we want to act in the movie named life. so she urged Elizebath to marry with him. Elizebath is enough brave to refuse her mother firmly",
"rcontent": "The first time she saw him, she flipped. The first time he saw her, he ran. That was the second grade, but not much has changed by the seventh. She says: “My Bryce. Still walking around with my first kiss.” He says: “It’s been six years of strategic avoidance and social discomfort.” But in the eighth grade everything gets turned upside down. And just as he’s thinking there’s more to her than meets the eye, she’s thinking that he’s not quite all he seemed. This is a classic romantic comedy of errors told in alternating chapters by two fresh, funny new voices. <font color='red' id=0>Wendelin Van Draanen is at her best here with a knockout cast of quirky characters and a hilarious series of </font>misunderstandings<font color='red' id=1> and missed opportunities.</font><font color='red' id=2> But underlying the humor are two teens in transition.</font> They are each learning to look beyond the surface of people, both figuring out who they are, who they want to be, and who they want to be with.",
"sim": "21.65",
"simcnt": "189",
"tag_id": "4",
"title": "The first time she saw him",
"topic_id": "48",
"user_id": "102"
},
{
"book_id": "22",
"ctime": "2017-08-15T00:07:27+08:00",
"lcontent": "Wendelin Van Draanen is at her best here with a knockout cast of quirky characters and a hilarious series of and missed opportunities. But underlying the humor are two teens in transition.In the book Pride and Prejudice we can find many distinctive characters, like Mr. Collins who spared all his effort to please Lady Catherine, an arrogant and selfish lady, Mrs. Collins who got married with somebody she didn't love but who could provide her with a steady life, the wise father Mr. Bennet, the naive and frivolous little girl Lydia and so on. Some people may judge their behaviour or personalities, but in my opinoin, that's every single person's right to choose to be who they want to be. Hope you and me can also find the character we want to act in the movie named life.<font color='red' id=0> so she urged Elizebath to marry with him.</font> <font color='red' id=1>Elizebath is enough brave to refuse her mother firmly</font>",
"rcontent": " After reading the novel, we know that the man Mr.Collins wanted to have a wife,so he requested Ms. Bennet to persuade her beatuiful daughter Elizabeth to marry with him. Ms. Bennet was afraid of Collins,<font color='red' id=0> so she urged Elizebath to marry with him.</font> Luckily,<font color='red' id=1>Elizebath is enough brave to refuse her mother firmly</font>. Elizebath thought that the marriage shouldn't be influenced by money.Also,the marriage without love is unacceptable.And we should live for herself, and we must protect her love firmly. Do you think so?",
"sim": "10.88",
"simcnt": "95",
"tag_id": "0",
"title": "We should live for ourselves and protect our love bravely. Do you think so?",
"topic_id": "42",
"user_id": "38"
}
]