[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-06-15 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466-branch5x.patch

Patch for branch 5x (before LUCENE-6371 is added)

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Assignee: Alan Woodward
Priority: Minor
 Fix For: 5.3, Trunk

 Attachments: LUCENE-6466-2.patch, LUCENE-6466-2.patch, 
 LUCENE-6466-2.patch, LUCENE-6466-branch5x.patch, LUCENE-6466.patch, 
 LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-29 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466-2.patch

Patch part 2, following discussion on LUCENE-6371.
* removes SpanSimilarity, in favour of a map of terms to termcontexts
* SpanTermQuery can take an optional TermContext in its constructor, similar to 
TermQuery
* SpanMTQWrapper now preserves term states when rewriting to SpanTermQueries

What would be nice would be to try and write an asserting TermsEnum that could 
check how many times seekExact(BytesRef) was called, to ensure that the various 
queries are re-using their term states properly.

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Fix For: Trunk, 5.3

 Attachments: LUCENE-6466-2.patch, LUCENE-6466.patch, 
 LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-29 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466-2.patch

Nits appropriately picked :-)

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Fix For: Trunk, 5.3

 Attachments: LUCENE-6466-2.patch, LUCENE-6466-2.patch, 
 LUCENE-6466-2.patch, LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, 
 LUCENE-6466.patch, LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-29 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466-2.patch

Oops, yes, I missed TopTermsSpanBooleanQueryRewrite.  Final patch with the 
changes there, plus some assertions copied from TermWeight/TermScorer.

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Fix For: Trunk, 5.3

 Attachments: LUCENE-6466-2.patch, LUCENE-6466-2.patch, 
 LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, 
 LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-21 Thread Robert Muir (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Muir updated LUCENE-6466:

Fix Version/s: Trunk
   5.3

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Fix For: Trunk, 5.3

 Attachments: LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, 
 LUCENE-6466.patch, LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-20 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466.patch

Updated to take into account changes from LUCENE-6490.  Running precommit now

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Attachments: LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, 
 LUCENE-6466.patch, LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-19 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466.patch

Final patch.  I'll commit this tomorrow, absent any objections.

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Attachments: LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, 
 LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-18 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466.patch

Updated patch, building on top of the SpanCollector API in LUCENE-6371.

This moves both getSpans() and extractTerms() to SpanWeight, and refactors the 
similarity and scoring a bit.  SpanWeight.getSpans() now looks very like 
Weight.scorer(), which is nice if we want to move towards merging the two APIs.

Still needs javadocs, etc, but I wanted to get some feedback before doing 
precommit checks.

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Attachments: LUCENE-6466.patch, LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-18 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466.patch

Another patch.  This one is nicer, I think.  It uses the needsScores parameter 
to determine whether or not to build the SpanSimilarity for a search.

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Attachments: LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6466) Move SpanQuery.getSpans() to SpanWeight

2015-05-06 Thread Alan Woodward (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Woodward updated LUCENE-6466:
--
Attachment: LUCENE-6466.patch

Here is a patch.  SpanQuery.createWeight() is now final, and delegates on to an 
abstract method #createSpanWeight().  This takes an additional boolean 
parameter to determine whether or not the weight is at the top of a span tree, 
in which case it should build term stats.

Ideally I'd have liked to move SpanQuery.extractTerms() to SpanWeight as well, 
but that causes complications when collecting terms in the SpanWeight 
constructor (basically you can't call extractTerms on a delegate from a super 
constructor, because the delegate hasn't been set yet).

 Move SpanQuery.getSpans() to SpanWeight
 ---

 Key: LUCENE-6466
 URL: https://issues.apache.org/jira/browse/LUCENE-6466
 Project: Lucene - Core
  Issue Type: Improvement
Reporter: Alan Woodward
Priority: Minor
 Attachments: LUCENE-6466.patch


 SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
 to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org