lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean O'Connor <s...@oconeco.com>
Subject Re: Can Span Queries contain boolean, prefix and other component queries?
Date Mon, 05 Sep 2005 01:59:07 GMT
Paul,
    Thanks for pointing me to the surround code. I have started playing 
with it, and am impressed. Now I just need to adjust my thinking a bit 
more to see if I can implement the tool correctly, and get my specific 
search functionality out of what it offers.
You've been a great help,

Sean


Paul Elschot wrote:

>Sean,
>
>On Sunday 04 September 2005 20:43, Sean O'Connor wrote:
>  
>
>>Hello,
>>    I am trying to do some complex queries such as:
>>
>>[Field contents]
>>The movie Napoleon Dynamite is a movie about a kid named Napoleon who 
>>has no Dynamite.
>>
>>[Query]
>>"Napol* Dynamite" near "film|movie"
>>
>>
>>    Is this possible with some version of a span query? Something like a 
>>PhrasePrefixQuery joined to a BooleanQuery by a SpanNearQuery?
>>    
>>
>
>This can be done using nested SpanNearQuery's and SpanOrQuery's.
>A PhrasePrefixQuery can not be used as a SpanQuery.
>
>  
>
>>    If not, does anyone have a suggestion on how to do this? I am 
>>assuming I will need to do two queries, and determine the 'nearness' of 
>>the resulting hits myself.
>>Thanks,
>>    
>>
>
>You can do this using the surround query language:
>
>(Napol* w dynamite) n (film or movie)
>
>The surround parser will construct the nested span queries.
>The surround query language is in the contrib/surround directory
>in the development version. The most striking difference with
>the lucene standard query language is that all operators 
>have to be given explicitly, there is no implicit 'and' or 'or'.
>
>Regards,
>Paul Elschot
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>  
>



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


Mime
View raw message