Results 1 to 2 of 2
Thread: Edit TopfieldDocs in Lucene
- 12-27-2012, 08:56 PM #1
Member
- Join Date
- Dec 2012
- Posts
- 1
- Rep Power
- 0
Edit TopfieldDocs in Lucene
Hi,
I am doing a search using Lucene but for certain phrases I am not getting an exact match. To counter this, I am looking at the number of times the query (phrase to search) occurs in the Document. For documents with "0" hits, I want to delete the entry. How do I do this?
Thank You for the helpJava Code://Initiated somewhere in the code TopFieldDocs topFieldDocs = null; multiSearcher = new MultiSearcher(indexSearchers); analyzer = new StandardAnalyzer(Version.LUCENE_34); queryParser = new QueryParser(Version.LUCENE_34, "path", analyzer); topFieldDocs = multiSearcher.search(query, filter, request.getHitStart() + request.getMax(), sortByDate); if (count==0) //count is the number of times query occurs in the document { delete from topFieldDocs; } else { // Display Result }Last edited by naaser; 12-28-2012 at 04:55 AM.
- 12-28-2012, 04:45 AM #2
Re: Edit TopfieldDocs in Lucene
Why do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Best choice? Edit bytecode (asm) or edit java file before compiling
By tgoossens in forum Advanced JavaReplies: 2Last Post: 02-22-2012, 10:09 AM -
Edit jar, see the code, edit code and back it as a jar
By RichersooN in forum New To JavaReplies: 1Last Post: 10-10-2011, 05:33 AM -
Edit .jar
By jwerre in forum New To JavaReplies: 1Last Post: 10-04-2009, 04:35 AM -
Edit a .jar?
By JuBe in forum New To JavaReplies: 4Last Post: 09-15-2009, 11:07 PM -
Edit Command
By viji83 in forum New To JavaReplies: 1Last Post: 08-15-2008, 03:26 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks