dreamwest Posted March 5, 2011 Share Posted March 5, 2011 Is there a way i can amend a field to simply add more data to the end of whats already there d_id corpus 1 (3, 17)|(9, 17) 2 (4, 6) 3 (89, 97) mysql_query("update `dic` set `corpus`='|(2, 12)' where `d_id`='3'"); //amend field with this query so after update row 3 will now be (89, 97)|(2, 12) Quote Link to comment https://forums.phpfreaks.com/topic/229633-amend-field/ Share on other sites More sharing options...
The Little Guy Posted March 5, 2011 Share Posted March 5, 2011 you can use CONCAT('(89, 97)', '|(2, 12)') Quote Link to comment https://forums.phpfreaks.com/topic/229633-amend-field/#findComment-1183128 Share on other sites More sharing options...
fenway Posted March 5, 2011 Share Posted March 5, 2011 Yeah, but that's evil data storage. Quote Link to comment https://forums.phpfreaks.com/topic/229633-amend-field/#findComment-1183247 Share on other sites More sharing options...
dreamwest Posted March 5, 2011 Author Share Posted March 5, 2011 Yeah, but that's evil data storage. Im trying to create a Sparse index where pairs of numbers point to locations in a document. How would you store this data? Quote Link to comment https://forums.phpfreaks.com/topic/229633-amend-field/#findComment-1183378 Share on other sites More sharing options...
fenway Posted March 6, 2011 Share Posted March 6, 2011 Well, i'm just wondering how you're query for such dat. Quote Link to comment https://forums.phpfreaks.com/topic/229633-amend-field/#findComment-1183514 Share on other sites More sharing options...
dreamwest Posted March 7, 2011 Author Share Posted March 7, 2011 as far as i know mysql cant search for corpus pairs, so is used only to retrieve pointers in the inverted doc. so a paired set like {21,4|45,5|78,9} means word "funny" appears in doc 4 at position 21 etc.. Ive read you can also use skipping to make the retrieval faster ..but for now im experimenting all methods Quote Link to comment https://forums.phpfreaks.com/topic/229633-amend-field/#findComment-1183843 Share on other sites More sharing options...
fenway Posted March 7, 2011 Share Posted March 7, 2011 I didn't understand a word of that. Are you ever searching by anything other than d_id? Quote Link to comment https://forums.phpfreaks.com/topic/229633-amend-field/#findComment-1184032 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.