Hi Mike, Hi Eks-Dev, first of all: Thank you so much! Both of you helped me a lot & it works fine!
> Additionally: If I submit no area > > query-string: "hello" > > the query should be applied as it would have a matching area. I'm not sure exactly what you mean. This simple query will only return documents that contain the string "hello" in the default field. Is that what you mean?
Yes this was exactly what i meant. So it works anyway... BTW: Is it possible to set more than one default-field at the QueryParser's constructor? Actually I've set it to "contents" but i'd like to search "contents" AND "title" and matches in title should have a higher rating. Nice day, david On 5/16/06, eks dev <[EMAIL PROTECTED]> wrote:
try: 1. query-string: "hello +area:home" to get Filtering effect 2. to minimize scoring use boosts: "(hello)^HIGH_BOOST +(area:home)^LOW_BOOST" 3. If scoring via boosts does not work good enough for you, or is slow, use Filter interface from your code... search this list for Filter ----- Original Message ---- From: David Trattnig <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Tuesday, 16 May, 2006 3:16:05 PM Subject: Search precondition: matching area Hello LuceneList, I've got at least following fields in my index: AREA = "home news business" CONTENTS = "... hello world ..." If I submit the query query-string: "hello area:home" Lucene should only search these documents which has the matching area. Actually Lucene searches the area, but it should NOT return results if the area doesn't match --> actually Lucene searches also in the other fields for the area - indeed with less rating - but they are returned. NOT include a matching area to the rating In other words: The area shouldn't handled like a standard search able field, more like a precondition if the query should be applied. Additionally: If I submit no area e.g. query-string: "hello" the query should be applied as it would have a matching area. Any help would be appreciated, Best Regards, David --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]