{"action":"created","issue":{"url":"https://api.github.com/repos/searchivarius/nmslib/issues/129","repository_url":"https://api.github.com/repos/searchivarius/nmslib","labels_url":"https://api.github.com/repos/searchivarius/nmslib/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/searchivarius/nmslib/issues/129/comments","events_url":"https://api.github.com/repos/searchivarius/nmslib/issues/129/events","html_url":"https://github.com/searchivarius/nmslib/issues/129","id":177294043,"number":129,"title":"Where are the query time results for HNSW?","user":{"login":"nliu86","id":13305896,"avatar_url":"https://avatars.githubusercontent.com/u/13305896?v=3","gravatar_id":"","url":"https://api.github.com/users/nliu86","html_url":"https://github.com/nliu86","followers_url":"https://api.github.com/users/nliu86/followers","following_url":"https://api.github.com/users/nliu86/following{/other_user}","gists_url":"https://api.github.com/users/nliu86/gists{/gist_id}","starred_url":"https://api.github.com/users/nliu86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nliu86/subscriptions","organizations_url":"https://api.github.com/users/nliu86/orgs","repos_url":"https://api.github.com/users/nliu86/repos","events_url":"https://api.github.com/users/nliu86/events{/privacy}","received_events_url":"https://api.github.com/users/nliu86/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-09-15T21:25:44Z","updated_at":"2016-09-16T18:00:19Z","closed_at":"2016-09-15T22:07:47Z","body":"After going through all the documentation, I was not able to figure out where the query time results are for HNSW. It should have a file which lists all the K-NNs for the queries I'm interested.\r\n\r\nBelow are the two commands I used. The first one is for creating index. The second is for querying.\r\n\r\n/Users/xxx/nmslib-1.5.3/similarity_search/release/experiment \\\r\n--distType float --spaceType l2 \\\r\n--knn 100 \\\r\n--dataFile ../head.num.txt --outFilePrefix result \\\r\n--queryFile ../head.num.txt_testset \\\r\n--cachePrefixGS hnsw \\\r\n--method hnsw \\\r\n--createIndex M=32,efConstruction=400,searchMethod=4 \\\r\n--queryTimeParams efSearch=100 \\\r\n--saveIndex hnsw_index \\\r\n--logFile logIndex.txt \\\r\n--threadTestQty 40\r\n\r\n/Users/xxx/nmslib-1.5.3/similarity_search/release/experiment \\\r\n--distType float --spaceType l2 \\\r\n--knn 100 \\\r\n--dataFile ../head.num.txt --outFilePrefix result \\\r\n--queryFile ../head.num.txt_testset \\\r\n--method hnsw \\\r\n--queryTimeParams efSearch=100 \\\r\n--loadIndex hnsw_index \\\r\n--logFile logQuery.txt \\\r\n--threadTestQty 40\r\n\r\nBelow are the files generated:\r\n\r\n-0-xxxx@xxxx:~/xxxxx/result $ ls -alt\r\ntotal 98592\r\n-rw-r--r-- 1 xxxx xxxx    27681 Sep 15 21:14 logQuery.txt\r\n-rw-r--r-- 1 xxxx xxxx      331 Sep 15 21:14 result_K=100.dat\r\n-rw-r--r-- 1 xxxx xxxx      831 Sep 15 21:14 result_K=100.rep\r\ndrwxr-xr-x 2 xxxx xxxx     4096 Sep 15 21:14 .\r\n-rw-r--r-- 1 xxxx xxxx    29233 Sep 15 21:10 logIndex.txt\r\n-rw-r--r-- 1 xxxx xxxx  1200008 Sep 15 21:10 hnsw_data.bin\r\n-rw-r--r-- 1 xxxx xxxx 99674820 Sep 15 21:10 hnsw_index\r\n-rw-r--r-- 1 xxxx xxxx     4082 Sep 15 21:10 hnsw_ctrl.txt\r\ndrwxr-xr-x 3 xxxx xxxx     4096 Sep 14 22:31 ..\r\n"},"comment":{"url":"https://api.github.com/repos/searchivarius/nmslib/issues/comments/247666769","html_url":"https://github.com/searchivarius/nmslib/issues/129#issuecomment-247666769","issue_url":"https://api.github.com/repos/searchivarius/nmslib/issues/129","id":247666769,"user":{"login":"nliu86","id":13305896,"avatar_url":"https://avatars.githubusercontent.com/u/13305896?v=3","gravatar_id":"","url":"https://api.github.com/users/nliu86","html_url":"https://github.com/nliu86","followers_url":"https://api.github.com/users/nliu86/followers","following_url":"https://api.github.com/users/nliu86/following{/other_user}","gists_url":"https://api.github.com/users/nliu86/gists{/gist_id}","starred_url":"https://api.github.com/users/nliu86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nliu86/subscriptions","organizations_url":"https://api.github.com/users/nliu86/orgs","repos_url":"https://api.github.com/users/nliu86/repos","events_url":"https://api.github.com/users/nliu86/events{/privacy}","received_events_url":"https://api.github.com/users/nliu86/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T18:00:19Z","updated_at":"2016-09-16T18:00:19Z","body":"Thanks for your quick response and advice! I have the feeling that NMSLIB\nwill become very useful because we need to do similarity search everywhere.\nSolr and Lucene are good for text similarity match. I have a way to turn\nshort text into numerical vectors and then do semantic similarity search\nwhich has much better results.\n\nRight now we're using Annoy in our offline and production system to find\nmost similar queries for a given query. I plan to replace them with NMSLIB.\nThere are two kinds of queries: popular queries and unpopular queries.\n\nThe number of popular queries is finite, say 1M. For them, we need to find\nother popular queries similar to them. After some post processing, we build\na dictionary that maps a given popular query to other popular queries. The\ndictionary will be used in live system. It would be great if we can use\nbatch processing to off-line build the dictionary quickly. Between query\nserver and C++/Python API, which one is better for batch processing?\n\nThe number of unpopular queries is infinite. They come in from live system\none by one. So we cannot merge them with the original 1M popular queries.\nFor these unpopular queries, the first task is to find most similar popular\nqueries. We need to do it very fast in live system.\n\nThanks,\n\nNick\n\nOn Fri, Sep 16, 2016 at 6:04 AM, Leonid Boytsov <notifications@github.com>\nwrote:\n\n> Hi,\n> there's no discussion board yet.\n> 1 million items isn't a lot, especially if you use a reasonable\n> efConstruction (200 is usually more than enough).\n> The query server is suitable for this task. The advantage of query server\n> is that it's Apache thrift. Therefore, you can call it over TCP/IP from\n> Java and Python (and actually you could probably generate Thrift classes\n> for all Thrift-supported langauages).\n> However, you can use C++ API directly.\n> Yes, HNSW is very efficient, just don't copy parameters verbatim from\n> ann-benchmark test. You can probably use smaller M and smaller\n> efConstruction.\n> Regarding the additional 1 million items: why don't you merge them with\n> the 1M original data set?\n> PS: there's no list yet. If really a lot of people start using NMSLIB, we\n> would need to setup one.\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/searchivarius/nmslib/issues/129#issuecomment-247595254>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AMsIKIB-XY4TfqHlmTWvJ7psCbUxrm8hks5qqpPcgaJpZM4J-Xxm>\n> .\n>\n"}}
{"actor":{"display_login":"nliu86"}}