lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "陈志祥" <>
Subject 回复: 回复:How to query for 'any word' in a phrase
Date Thu, 09 Jan 2020 16:18:56 GMT
i guess when you use * to mask a word,that is slop +1,continuous words means slop 0。PhaseQuery
can only set a slop which is the max skip words count between terms,so that is a static
config,not “dynamically set”

阿里巴巴 地图引擎核心算法工程师 
	   		 阿里巴巴  	 企业主页  		      
Information Security Notice: The information contained in this mail is solely property of
the sender's organization. 
This mail communication is confidential. Recipients named above are obligated to maintain
secrecy and are not permitted to disclose the contents of this communication to others.  ------------------------------------------------------------------
发件人:Jeroen Lauwers<Jeroen.Lauwers@CTLO.NET>
日 期:2020年01月09日 23:41:37
主 题:RE: 回复:How to query for 'any word' in a phrase

I don’t understand your question:

In general: can it be set? Yes, : PhraseQuery<>(int
slop, String<>
field, BytesRef<>...
In my specific case: also Yes. I’m parsing the query myself in a custom parser, so yes I
can do it

As far as I understand, the slop is not specific to a position
Please explain how this could help.


From: 陈志祥 <>
Sent: donderdag 9 januari 2020 16:31
Subject: 回复:How to query for 'any word' in a phrase

could the slop parameter in phasequery be dynamically set?

发件人:Jeroen Lauwers<Jeroen.Lauwers@CTLO.NET<mailto:Jeroen.Lauwers@CTLO.NET>>
日 期:2020年01月09日 23:17:37
主 题:How to query for 'any word' in a phrase

Dear all,

Is there a way to construct (spans?) a phrase search like the following:
the quick brown * jumps over the * *
where * = any word but exactly 1 word

I introduced these *’s at a specific position, so a PhraseQuery with slop of 2 is just not
good enough
and the two *’s at the end must be matched as well.

Is there such a thing as a Term or BytesRef that always matches everything?


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