Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My spannearquery constructor is below:

C#
public SpanNearQuery(SpanQuery[] spanQuery, int slop, bool inOrder)
{
    this.clauses = new System.Collections.ArrayList(spanQuery.Length);
    for (int i = 0; i < spanQuery.Length; i++)
    {
        SpanQuery clause = spanQuery[i];
        if (i == 0)
        {
            // check field
            field = clause.GetField();
        }
        else if (!clause.GetField().Equals(field))
        {
            throw new System.ArgumentException("Clauses must have same field.");
        }
        this.clauses.Add(clause);
    }

    this.Slop = slop;
    this.InOrder = inOrder;
}


In SpanNearQuery, GetField() is SpanQuery method. I dont know how to implement GetField() method in SpanQuery class.

Can you please help me anyone?

[edit]Code block added - OriginalGriff[/edit]
Posted
Updated 22-Jan-13 22:08pm
v2
Comments
Thomas Duwe 23-Jan-13 5:24am    
Thats an exact copy of the constructor of SpanNearQuery.java from the Lucene project.
Perhaps you should look at the Lucene.Net project page: http://lucenenet.apache.org/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900