lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: "Field Grouping" query restrained to same field on a 'multi'-field'
Date Wed, 09 Aug 2006 23:33:16 GMT
: > You could do this with the current query parser by putting large
: > position increment gaps between paragraphs that is guaranteed to be
: > larger than the largest paragraph.  Then you could use a sloppy phrase
: > query
: > "word1 word2"~10000 for instance.

: Unfortunatelly this only makes sense for simple AND/phrase Queries, but
: we also want more complex boolean queries like :
: "nice cat" AND ("mouse" OR "rat" ) AND NOT ("dog")

you should still be able use the slop based approach to solve this by
using Span queries (SpanNear for Phrases and "AND", SpanOr for "OR" and
SpanNot for "NOT") -- but to get the full compliment of all the options
you might want, you'll probably need to insert arbitrary marker tokens in
between each paragraph, and then lump your entire query into a SpanNot
where the exclude clause is a SpanTerm query on your arbitrary paragraph
marker.

this has been discussed in the past, search the Lucene mailing list
archives for "sentence".




-Hoss


---------------------------------------------------------------------
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