lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sol myr <>
Subject [Lucene] Frequencies and positions - are they stored per field?
Date Tue, 04 Oct 2011 09:46:12 GMT


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));

// 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 ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message