lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Froh <msf...@gmail.com>
Subject Re: PhraseQuery
Date Fri, 24 Jan 2020 17:54:27 GMT
Did you check the Javadoc for PhraseQuery.Builder?

https://lucene.apache.org/core/6_5_0/core/org/apache/lucene/search/PhraseQuery.Builder.html

Checking the source code, I see that the add method that takes a position
argument will throw an IllegalArgumentException if you try to add a Term in
a lower position than the previous Term. (That is, Term positions must be
non-decreasing.)

Hope that helps,
Michael

On Fri, 24 Jan 2020 at 09:45, <baris.kazar@oracle.com> wrote:

> Hi,-
>
>   how do i enforce the order of sequence of terms in the PhraseQuery
> builder?
>   Lucene docs are very hard to understand in terms of api descriptions.
>
>
> https://lucene.apache.org/core/6_5_0/core/org/apache/lucene/search/PhraseQuery.html
> Best regards
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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