On Nov 17, 2007, at 1:07 PM, João Rodrigues wrote:

So, I have this code. The first part is in the index writing script. The second in the searcher. I'm given a NONE when printing the TFVector. This means there isn't any vector right? How do I fix this? The instructions on LIA aren't the best I'm afraid... What I'm trying to do is to get the frequency of the term I search in each document.


line 6:
doc.add(PyLucene.Field("contents", contents, PyLucene.Field.Store.NO, PyLucene.Field.Index.TOKENIZED)
change to
doc.add(PyLucene.Field("contents", contents, PyLucene.Field.Store.NO, PyLucene.Field.Index.TOKENIZED, PyLucene.Field.TermVector.YES)

assuming PyLucene has ported that symbol. As it is you're not storing the term vector of your indexed field. On preview, Andi is right, check the lucene lists for questions like these...



_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to