Hi member of digitalsmiths,

I also implemented SpanNearQueryNode and some QueryNodeProcessors.
Most possible you can solve your problem by using
QueryNode#setTag:
In QueryNodeProcessor#preProcessNode you can set and remove and reset a Tag to 
mark the AndNodes that should became SpanNodes;
after this you can use the QueryNodeProcessor#postProcessNode method to 
substitute this AndNodes in your OrNodes.

(But be aware of https://issues.apache.org/jira/browse/LUCENE-3045 )

Best regards
  Karsten

-------- Original-Nachricht --------
> Datum: Mon, 13 Jun 2011 19:45:49 -0700 (PDT)
> Von: mtraynham <mtrayn...@digitalsmiths.com>
> An: solr-user@lucene.apache.org
> Betreff: AndQueryNode to NearSpanQuery
> ...
> The SpanNearQueryNode is a class I made that implements FieldableNode
> and extends QueryNodeImpl (as I want all Fieldable children to be from 
> the same field, therefore just remembering the terms).  Plus it
>  maintains a distance or slop factor and a inOrder boolean.
> 
> The problem here is that I can't keep the children from getting
>  manipulated further down the pipeline, because I want my 
> NearSpanQueryBuilder to use it's original children nodes and at the same 
> time be cloned/changed/etc.  QueryNodeImpl has many private and final 
> methods and you can't override setChildren, etc, etc., but I'd rather 
> stay away from monkey patching. 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/AndQueryNode-to-NearSpanQuery-tp3061286p3061607.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to