[
https://issues.apache.org/jira/browse/LUCENE-5091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13712440#comment-13712440
]
David Smiley commented on LUCENE-5091:
--------------------------------------
Looks good, Tim, except for one thing: The way you incorporated pre & post
into the hashCode is bad, as another unequal query with a pre and post values
with flipped values would have the same hashCode. I'm consulting the other
dev's on
https://issues.apache.org/jira/browse/LUCENE-460?focusedCommentId=13712434&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13712434
on a suitable replacement, which will block me committing this for the moment.
Also, I updated the package.html summary with a new description matching the
class javadocs:
{code:html}
<li>A {@link org.apache.lucene.search.spans.SpanNotQuery SpanNotQuery} removes
spans
matching one {@link org.apache.lucene.search.spans.SpanQuery SpanQuery} which
overlap (or comes
near) another. This can be used, e.g., to implement within-paragraph
search.</li>
{code}
> Modify SpanNotQuery to act as SpanNotNearQuery too
> --------------------------------------------------
>
> Key: LUCENE-5091
> URL: https://issues.apache.org/jira/browse/LUCENE-5091
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/search
> Affects Versions: 4.3.1
> Reporter: Tim Allison
> Assignee: David Smiley
> Priority: Minor
> Fix For: 4.5
>
> Attachments: LUCENE-5091.patch.txt
>
>
> With very small modifications, SpanNotQuery can act as a SpanNotNearQuery.
> To find "a" but not if "b" appears 3 tokens before or 4 tokens after "a":
> new SpanNotQuery("a", "b", 3, 4)
> Original constructor still exists and calls SpanNotQuery("a", "b", 0, 0).
> Patch with tests on way.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]