As always, I'd try starting with what the user interface (in this
case, syntax) should look like.
It makes sense to add elementary spans first.

{!spannear a=query1 b=query2 slop=10}

Thinking about implementation... what would really magnify the
usefulness of the basic API above is to convert non-span queries to
span queries automatically.  This is useful because the sub-queries of
a span query must be span queries, and most query parsers generate
non-span queries.  I think there is code in the highlighter that uses
spans that can do this conversion.

-Yonik
http://www.lucidimagination.com


On Wed, Jan 27, 2010 at 12:24 PM, Christopher Ball
<christopher.b...@metaheuristica.com> wrote:
> I am about to attempt to implementing the SpanQuery in Solr 1.4.
>
>
>
> I noticed there is a JIRA to add it in 1.5:
>
>
>
> *       https://issues.apache.org/jira/browse/SOLR-1337
>
>
>
> I also noticed a couple of email threads from Grant and Yonik about trying
> to implement it such as:
>
>
>
> *       http://old.nabble.com/SpanQuery-support-td15246477.html
>
>
>
> So . . .
>
>
>
> *       Question: Has anyone started working on SOLR-1337 for Solr 1.5?
>
>
>
> And if not . . .
>
>
>
> *       Question: Is the best way to go about it is to follow the following
> recipe?
>
>
>
> 1.       Configure
>
> a.       Specify a new parser plugin in solrconfig.xml:
>
> b.       <queryParser name="mySpanQueryParser"
> class="SpanQueryParserPlugin"/>
>
> 2.       Implement
>
> a.       Use the FooQParserPlugin as a starting template
> (https://svn.apache.org/repos/asf/lucene/solr/trunk/src/test/org/apache/solr
> /core/SOLR749Test.java)
>
> 3.       Access
>
> a.       Access the current query type via 'q=mySpanQueryParser '
>
>
>
> Most grateful for any thoughts,
>
>
>
> Christopher
>
>

Reply via email to