Hi,
I use Lucene, but an not familiar with its internals.
I'd appreciate help understanding whether Term Frequences and Positions - are
stored per Document of per Field?
On the one hand, I never ask for "Field.TermVector" because I read it's only
required for "MoreLikeThis" (which I don't need).
On the other hand, my searches *are* based on fields...
Here's my code:
// Write (without Field.TermVector):
Document doc=new Document();
doc.add(new Field("subject", "Requisition request", Store.YES,
Index.ANALYZED));
doc.add(new Field("body", "Attached is an Urgent requisition request",
Store.YES, Index.ANALYZED));
write.addDocument(doc);
// And my Query:
Query query=parser.parse("subject : urgent");
Now how does Lucene manage this query?
I asked it to search the "subject" Field.
But if the "inverted index" doesn't keep fields, it would only remember that
"The term 'Urgent' appears in SOME FIELD of document#1 "...
Isn't it true?
If so, how would it make sure to retrieve only documents that match in the
Subject ?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]