Export to GitHub

jatetoolkit - issue #3

Class GlobalIndexWriterHSQL do not genrate the correct maps term2doc, doc2term and term2var


Posted on Jan 29, 2013 by Swift Elephant

What steps will reproduce the problem? 1. in Algorithm Tester activate the option to write persistent HSQL database 2. check the database script 3.

What is the expected output? What do you see instead? term2doc table only has a document for each term doc2term table only has a term for each document term2var only has a var for each term

What version of the product are you using? On what operating system? 1.1 / ubuntu 12.04

Please provide any additional information below.

In the GlobalIndexWriterHSQL.persist class there is a "=" instead a "+=" in the inner for loops of the code blocks: //persist term2DocMap, //persist doc2TermMap and //persist termId2VarIds map

i.e.

for (Map.Entry<Integer, Set<Integer>> e : index.getTerm2Docs().entrySet()) { pstmt.setInt(1, e.getKey()); String docIdStr = ""; for(Integer i: e.getValue()){ //docIdStr=HSQLDBUtil.VALUE_SEPARATOR+i; docIdStr+=HSQLDBUtil.VALUE_SEPARATOR+i; }

Comment #1

Posted on Mar 7, 2013 by Happy Dog

Thanks for this. I have corrected this and updated in the SVN. Will

Comment #2

Posted on Jul 25, 2013 by Happy Dog

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium