Results 1 to 1 of 1
Thread: Searching in several fields
- 11-11-2009, 10:24 AM #1Member
- Join Date
- Nov 2009
- Rep Power
Searching in several fields
i created an application which indexes the WHOLE content of a PDF file to a field 'content' in the lucene index. I also have another field 'title' in the index which maps the title of the document (Metadata of PDF doc available, so i know the title). Well, as you might guess now the title will appear in the title as well as in the content field.
What i want now is that if the search term (e.g 'cancer') is contained in the title field, a found document should be scored higher than a document that only contains the term 'cancer' in the field 'content'.
What is the BEST and SIMPLEST (and a fast => search time) solution for this? I already know that fields that are shorter in length will count more (if the term was found) for the total score automatically. Could anyone give me a concrete example maybe?
Thanks a lot
- By Eranga in forum Advanced JavaReplies: 25Last Post: 08-29-2009, 11:06 AM
- By Java Tip in forum SWT TipsReplies: 0Last Post: 07-25-2008, 02:20 PM
- By Dracos in forum New To JavaReplies: 0Last Post: 02-04-2008, 10:39 PM
- By youayshu in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 11-13-2007, 08:10 AM
- By romina in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:29 AM