lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tri Cao <tm...@me.com>
Subject Re: Lucene Query
Date Tue, 19 Aug 2014 18:07:32 GMT
given that example, the easy way is a boolean AND query of all the terms:

http://lucene.apache.org/core/4_6_0/core/org/apache/lucene/search/BooleanQuery.html

However, if your corpus is more sophisticated you'll find that relevance ranking is not always
that trivial :)

On Aug 19, 2014, at 11:00 AM, Jin Guang Zheng <zhengj3@rpi.edu> wrote:

Hi,

I am wondering if someone can help me on this:

I have index:

doc 1 -- label: United States of America

doc 2 -- label: United
doc 2 -- label: America
doc 2 -- label: States

I am wondering how to generate a query with terms: states united america

so only doc 1 returns.


I was thinking SpanNearQuery, but can't make it work.

Thanks,
Jin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message