lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: [jira] Commented: (LUCENE-794) SpanScorer and SimpleSpanFragmenter for Contrib Highlighter
Date Wed, 14 Mar 2007 20:13:06 GMT

On Mar 14, 2007, at 2:17 PM, Mark Miller (JIRA) wrote:
> Just for thought, what about a SpanOr query with two sub Span  
> queries that target different fields? Too obscure to care about?

You later mentioned that this works.  Really?!  Are you sure?

   public SpanOrQuery(SpanQuery[] clauses) {

     // copy clauses array into an ArrayList
     this.clauses = new ArrayList(clauses.length);
     for (int i = 0; i < clauses.length; i++) {
       SpanQuery clause = clauses[i];
       if (i == 0) {                               // check field
         field = clause.getField();
       } else if (!clause.getField().equals(field)) {
         throw new IllegalArgumentException("Clauses must have same  
field.");
       }
       this.clauses.add(clause);
     }
   }





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


Mime
View raw message