Changeset 16947 for indexers/trunk


Ignore:
Timestamp:
2008-08-21T15:13:41+12:00 (16 years ago)
Author:
mdewsnip
Message:

Changed the Lucene code to use the Greenstone document OIDs directly, instead of creating its own numeric IDs and then mapping them to the Greenstone OIDs in the GDBM file. As well as being simpler and more space and speed efficient (the mapping no longer needs to be stored in the GDBM file, and no lookup needs to be done for each search result), this is another important step along the road to true incremental building.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indexers/trunk/lucene-gs/src/org/greenstone/LuceneWrapper/GS2LuceneQuery.java

    r16912 r16947  
    203203            Document doc = hits.doc(i - 1);
    204204            int doc_term_freq = ((Integer) doc_term_freq_map.get(new Integer(lucene_doc_num))).intValue();
    205             lucene_query_result.addDoc(doc.get("nodeID").trim(), hits.score(i-1), doc_term_freq);
     205            lucene_query_result.addDoc(doc.get("docOID").trim(), hits.score(i-1), doc_term_freq);
    206206        }
    207207        }
     
    221221            Document doc = reader.document(lucene_doc_num);
    222222            int doc_term_freq = ((Integer) doc_term_freq_map.get(new Integer(lucene_doc_num))).intValue();
    223             lucene_query_result.addDoc(doc.get("nodeID").trim(), hits.scoreDocs[i-1].score, doc_term_freq);
     223            lucene_query_result.addDoc(doc.get("docOID").trim(), hits.scoreDocs[i-1].score, doc_term_freq);
    224224        }
    225225        }
Note: See TracChangeset for help on using the changeset viewer.