lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Scerri <tony.sce...@gmail.com>
Subject Cloning of queries
Date Fri, 06 Jan 2006 12:42:37 GMT
Hi

Is there an official line on the supported behaviour for cloning queries? I
have been working with Spans and I found they were not working correctly
because of missing clone methods on some of the classes. I expanded this to
handle SpanWildcardQuery also which comes in very handy. But today i also
found that BooleanQuery are not clonned correctly becasue a BooleanClause
isnt clonning. So if you clone a BooleanQuery then call the setQuery method
on one of the clauses to modify it both the original and cloned BooleanQuery
reflect this change.

Im not sure whether what im doing is something that is supported and
therefore needs patching or im just messing with stuff i shouldnt be. Im
working from the latest SVN codebase.

While im on the subject of Phrase and Span queries. Would anyone support the
idea of loosing Phrase queries and moving to the more flexible Span query
model. I know phrases are quicker but surely optimized handling of exact
phrases could be included. Its just being able to embed one span within
another is really handy. I would like to see that functionality supported
fully within the main query model, so you can use any normal query operator
within a span. So really it means making SpanNear part of the normal model
and utilising the existing Query operator rather than the Span variants.

Thanks

Tony

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message