Cleo中的问题,其名称略有变体

时间:2014-07-29 17:36:42

标签: search cleo

我一直在使用来自的cleo-primer https://github.com/jingwei/cleo-primer

并且发现了一个严重烦人的问题。例如。在我的dat文件中看到这个元素(格式与文件相同)。

<?xml version="1.0" encoding="us-ascii"?>
<element-list>
<element>
    <id>12205</id> 
    <score>420.000000</score> 
    <name>angel investor</name> 
    <term>angel investings</term> 
    <term>angel investing</term> 
    <term>angel investments</term> 
    <term>angel investment</term> 
    <term>angel investors</term> 
    <term>angel investor</term> 
    <term>business angel</term> 
    <term>informal investor</term> 
    <term>angel</term> 
    <term>investor</term>
</element>
</element-list>

我使用
将此文件添加到cleo服务器 ./scripts/post-element-list.sh mydat-file.xml 它使用
curl -v -X POST -H "Content-type: application/xml" -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements/ --data-binary
来添加元素并获得输出。

* STATE: INIT => CONNECT handle 0x60002e190; line 1028 (connection #-5000)
* Hostname was NOT found in DNS cache
*   Trying ::1...
* STATE: CONNECT => WAITCONNECT handle 0x60002e190; line 1076 (connection #0)
* Connected to localhost (::1) port 8080 (#0)
* STATE: WAITCONNECT => DO handle 0x60002e190; line 1195 (connection #0)
> POST /cleo-primer/rest/elements/ HTTP/1.1
> User-Agent: curl/7.37.0
> Host: localhost:8080
> Content-type: application/xml
> Accept: application/xml
> Content-Length: 4428
> Expect: 100-continue
>
* STATE: DO => DO_DONE handle 0x60002e190; line 1281 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x60002e190; line 1407 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x60002e190; line 1420 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 100 Continue
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Content-Length: 0
* Server Jetty(6.1.25) is not blacklisted
< Server: Jetty(6.1.25)
<
* STATE: PERFORM => DONE handle 0x60002e190; line 1590 (connection #0)
* Connection #0 to host localhost left intact
* Expire cleared

然后我在浏览器中查询了URL

  

CLEO引物/休息/元件/搜索?查询= my_query


当用'天使投资','天使投资'查询时,它给出null。但是当用“天使投资”或“天使投资人”查询时,给予元素本身。 在严格的测试中,我发现当查询的术语最后只是名称的一个轻微变体时,它只显示这种类型的null。请让我知道如何使用cleo-primer解决这个问题。

0 个答案:

没有答案