I am facing same problem with lucen3.0.2 search. I am using StandardAnalyzer to create index.
IndexWriter writer = new IndexWriter(FSDirectory.open(INDEX_DIR), new StandardAnalyzer(Version.LUCENE_CURRENT), true, new IndexWriter.MaxFieldLength(1000000));
on the other hand for search I am using same analyser. In case of term query(ie; query having single word) result is fine and gives correct no of occurrence in the file searched.
When using phrase query (ie; multiTerm query like sql server) it gives file that contents sql server (no. of docoments) but do not gives correct no of occurrence in each document.
If you have any solution plz.. help me out.
thanks in advance!!!