manticoresearch icon indicating copy to clipboard operation
manticoresearch copied to clipboard

sql_joined_field can't be stored

Open sanikolaev opened this issue 4 years ago • 4 comments

sql_joined_field's name can be specified in stored_fields w/o any error and it is shown as stored in desc, but the value doesn't get stored:

source min {    
    type = mysql    
    sql_host = localhost    
    sql_user = test    
    sql_pass =    
    sql_db = test    
    sql_query = select 1, 'abc' doc    
    sql_joined_field = tag from query; select 1, 'joined'    
}    
    
index idx {    
    path = idx    
    source = min    
    stored_fields = doc, tag    
}    
    
searchd {    
    listen = 9315:mysql41    
    log = sphinx_min.log    
    pid_file = /home/snikolaev/9315.pid    
    binlog_path =    
}    
mysql> desc idx;    
 ------- -------- ----------------     
| Field | Type   | Properties     |    
 ------- -------- ----------------     
| id    | bigint |                |    
| doc   | text   | indexed stored |    
| tag   | text   | indexed stored |    
 ------- -------- ----------------     
3 rows in set (0.00 sec)    
    
mysql> select * from idx;    
 ------ ------ ------     
| id   | doc  | tag  |    
 ------ ------ ------     
|    1 | abc  |      |    
 ------ ------ ------     
1 row in set (0.00 sec)    
    
mysql> select * from idx where match('joined');    
 ------ ------ ------     
| id   | doc  | tag  |    
 ------ ------ ------     
|    1 | abc  |      |    
 ------ ------ ------     
1 row in set (0.02 sec)    

The expected behaviour is that the value would be in docstore in this case too.

sanikolaev avatar Dec 21 '20 06:12 sanikolaev

Hi Are there any foreseeable deadlines for fixing this bug? Highlighting in the search does not work because of it.

madgreen1 avatar Oct 07 '21 07:10 madgreen1

Hi. I'm afraid it's not in the nearest plans, but I'll check with the team and if it's fairly easy to fix this we'll do it.

sanikolaev avatar Oct 08 '21 04:10 sanikolaev

Hi! There is no solution yet?

madgreen1 avatar Feb 01 '22 07:02 madgreen1

Hi

That's correct, the issue is still open. We hope to solve it by the next release. If you need it sooner please fill free to:

  • fix it yourself and make a PR - most preferable
  • use our professional services - https://manticoresearch.com/services

sanikolaev avatar Feb 01 '22 07:02 sanikolaev

➤ Ilya Kuznetsov commented:

Fixed in f54b053c

githubmanticore avatar Sep 16 '22 10:09 githubmanticore