lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Israel Tsadok <itsa...@gmail.com>
Subject Re: Zero-position query?
Date Mon, 03 Jun 2013 04:16:07 GMT
You can do this with a PhraseQuery[1]. Just add more terms with position 0.

[1] http://lucene.apache.org/core/4_3_0/core/org/apache/lucene/search/PhraseQuery.html#add(org.apache.lucene.index.Term,
int)


On Mon, Jun 3, 2013 at 6:46 AM, Lance Norskog <goksron@gmail.com> wrote:

> What is a Lucene query that will find two words at the same term position?
> Is there a class that will do this? Is the feature available from the
> Lucene query syntax or any other syntax parsers?
>
> For example, if I'm using synonyms at index time I should get the base
> word and all synonyms at the same position. What is a query that will find
> a document with the synonym substituted, but will not find a document which
> has the base word and a synonym at two different positions?
>
> Thanks,
>
> Lance.
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.**apache.org<java-user-unsubscribe@lucene.apache.org>
> For additional commands, e-mail: java-user-help@lucene.apache.**org<java-user-help@lucene.apache.org>
>
>

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