Parse indexation recherche XML Digester Lucene
Bonjour,
Je tente de mettre en oeuvre un moteur de recherche en m'appuyant sur le code :
http://www.ibm.com/developerworks/ja...rary/j-lucene/
Or à l'execution :
Code:
1 2 3 4 5 6 7 8 9
|
IndexSearcher searcher = new IndexSearcher(indexDir);
Query query = new TermQuery(new Term("name", "Zane"));
Hits hits = searcher.search(query);
System.out.println("NUMBER OF MATCHING CONTACTS: " + hits.length());
for (int i = 0; i < hits.length(); i++)
{
System.out.println("NAME: " + hits.doc(i).get("name"));
} |
En sortie j'ai :
Citation:
NUMBER OF MATCHING CONTACTS: 1
NAME: null
Je ne comprends pas pourquoi le NAME reste à Null????
Merci de votre aide