You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/09/11 21:31:10 UTC
[39/50] [abbrv] lucenenet git commit: Added missing documentation to
SpanNearClauseFactory
Added missing documentation to SpanNearClauseFactory
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2efd9b41
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2efd9b41
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2efd9b41
Branch: refs/heads/master
Commit: 2efd9b4104fb9220d73e74b3042fd468ee637171
Parents: 7b7b634
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Aug 2 18:38:01 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Sep 2 22:31:05 2016 +0700
----------------------------------------------------------------------
.../Surround/Query/SpanNearClauseFactory.cs | 31 ++++++++++++++++++++
1 file changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2efd9b41/src/Lucene.Net.QueryParser/Surround/Query/SpanNearClauseFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Surround/Query/SpanNearClauseFactory.cs b/src/Lucene.Net.QueryParser/Surround/Query/SpanNearClauseFactory.cs
index 1465462..aa6a1d4 100644
--- a/src/Lucene.Net.QueryParser/Surround/Query/SpanNearClauseFactory.cs
+++ b/src/Lucene.Net.QueryParser/Surround/Query/SpanNearClauseFactory.cs
@@ -24,6 +24,37 @@ namespace Lucene.Net.QueryParser.Surround.Query
*/
/// <summary>
+ /// SpanNearClauseFactory:
+ ///
+ /// Operations:
+ ///
+ /// - create for a field name and an indexreader.
+ ///
+ /// - add a weighted Term
+ /// this should add a corresponding SpanTermQuery, or
+ /// increase the weight of an existing one.
+ /// - add a weighted subquery SpanNearQuery
+ ///
+ /// - create a clause for SpanNearQuery from the things added above.
+ /// For this, create an array of SpanQuery's from the added ones.
+ /// The clause normally is a SpanOrQuery over the added subquery SpanNearQuery
+ /// the SpanTermQuery's for the added Term's
+ ///
+ /// When it is necessary to suppress double subqueries as much as possible:
+ /// GetHashCode() and Equals() on unweighted SpanQuery are needed (possibly via GetTerms(),
+ /// the terms are individually hashable).
+ /// Idem SpanNearQuery: hash on the subqueries and the slop.
+ /// Evt. merge SpanNearQuery's by adding the weights of the corresponding subqueries.
+ ///
+ /// To be determined:
+ /// Are SpanQuery weights handled correctly during search by Lucene?
+ /// Should the resulting SpanOrQuery be sorted?
+ /// Could other SpanQueries be added for use in this factory:
+ /// - SpanOrQuery: in principle yes, but it only has access to it's terms
+ /// via getTerms(); are the corresponding weights available?
+ /// - SpanFirstQuery: treat similar to subquery SpanNearQuery. (ok?)
+ /// - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)
+ ///
/// Factory for <see cref="SpanOrQuery"/>
/// </summary>
public class SpanNearClauseFactory