-
Notifications
You must be signed in to change notification settings - Fork 20
BUG:can't search utf8 string ( and can't display correct utf8 encoding result) #3
Comments
thanks for the issue. I just changed the calculation of the size of strings. |
I have tested, it should return the data, but did not return any data. |
This behavior is it expected ? Can I close the issue ? |
I mean.Although there is no error display, but the data returned is empty. . .It stands to reason there should have some content returned |
I'm not used to working with utf8 string and sphinx. So, I build my own example, I inserted some misc UTF-8 content in test's table (cf. /usr/share/doc/sphinxsearch/example-conf/example.sql) :
After indexing, I have :
But when I try to search utf8 strings, I have no result :
I try the same query with the PHP and Node API.
and
Are you seeing the same thing ? |
I do not know why, I also tested under the limestone (https://github.com/kurokikaze/limestone). This module seems to work well, or you look at this module may help you solve the problem? |
I know Limestone, It uses buffer_extras.js by Tim Caswelll to build the query. Here, I use a array and a reduce function. It's bit different. To find the bug I need to reproduce it. Can you send me your sphinx configuration ? |
Ok. this is my sphinx configuration:
|
I have not been able to reproduce the bug. I readed several times the code source and I compared it with the others implementations and I don't known why there are a problem in your case. If you are interested, you can try to compare the request generated by Limestone with that produced by Sphinxapi... see here : |
When i query '测试' or other string。。。example: 'ふじこ' 。。node-sphinxapi display some error.Whether it not support the search for utf8 encoding string
btw: it do not display correctly results ( utf8 encoding)
the code 1:
var SphinxClient = require ("./node-sphinxapi/lib/sphinxapi.js"),
assert = require('assert');
I put 'console' in sphinxapi.js (line: 456)
the result is:
[Error: searchd error: invalid weight count -1914142587 (should be in 0..256 range)]
null
the code 2:
var SphinxClient = require ("./node-sphinxapi/lib/sphinxapi.js"),
assert = require('assert');
result is :
null [ { error: '',
warning: '',
status: [ 0 ],
fields: [ 'name' ],
attrs: [ [Object], [Object] ],
matches: [ [Object] ],
total: 1,
total_found: 1,
time: 0.001,
words: [ [Object] ] } ]
I put 'console' in sphinxapi.js (line: 456)
console.log(err).
console.log(response).
console.log(response.toString('utf8')).
its display some data like:
null
<Buffer 00 00 00 00 00 00 00 01 00 00 00 04 6e 61 6d 65 00 00 00 02 00 00 ...>
loli忍者 .......
The text was updated successfully, but these errors were encountered: