Excellent !!
Thanks for pointing me towards the ComplexPhraseQueryParser.

--Regards
Ba3


Ahmet Arslan wrote:
> 
> 
>> Can you please suggest me some pointers as to how a range
>> query combined with proximity be done.
> 
> Your remedy is ComplexPhraseQueryParser that utilizes SpanQuery family.
> https://issues.apache.org/jira/browse/LUCENE-1486
> That accepts ranges, ORs, Wildcards inside Phrase queries.
> 
> Using this new QueryParser your query will be someting like.
> (with the default field set to contents) 
> 
> "revision [40 TO 50]"
> 
> If you want to construct your Query programmatically with Lucene Query
> API:
> 
> Query query = spanNear([contents:revision, spanOr([contents:40,
> contents:41, ..., contents:50])], 0 , true)
> 
> Take a look at those Query subclasses:
> 
> org.apache.lucene.search.spans.SpanNearQuery
> org.apache.lucene.search.spans.SpanOrQuery
> org.apache.lucene.search.spans.SpanTermQuery
> 
> 
>       
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Range-query-and-a-proximity-search-tp24582865p24586758.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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

Reply via email to