lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Any existing query types that support equivalent of "-not interested" ?
Date Sat, 01 Jul 2006 08:37:31 GMT
On Saturday 01 July 2006 01:10, markharw00d wrote:
> 
> >Maybe this:
> >
> >SpanNotQuery(interested, SpanNearQuery(not,interested))
> >
> >with a SpanTermQuery for each term?
> >  
> >
> 
> Thanks, Paul. This is working well for me and I can happily use multiple 
> SpanTermQueries embedded in a SpanOrQuery in place of each of the single 
> words in your example.

I've never tried it myself, so it's good to hear that it actually works...

> 
> SpanNotQuery(
> 	SpanOrQuery(interested,curious...) 
> 	SpanNearQuery(
> 		SpanOrQuery(not,wasnt,isnt,...)
> 		SpanOrQuery(interested,curious...)
> 		)
> 	)

How about sth like this to get rid of the duplicates in there:

SpanNotNearQuery(includeSpanQuery, excludeSpanQuery, distance, ordered)

?
Writing the SpanScorer for that would be some work, though.

Regards,
Paul Elschot

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message