Re: Quest about Lucene's IndexSearcher.search(Query query, int n) API's parameter n

2020-01-09 Thread Uwe Schindler
You can sort with custom formulas. All values that are needed for calculation must be part of the index as docvalues fields. You can then use expressions module to supply a formula for the calculation, which may include the original score. The expressions module can override the score (so standa

Quest about Lucene's IndexSearcher.search(Query query, int n) API's parameter n

2020-01-09 Thread 小鱼儿
I'm doing a POI(Point-of-interest) search using lucene, each POI has a "location" which is a GeoPoint/LonLat type. I need do a keyword-range search but the query result POIs need to sort by distance to a starting point. This "distance", in fact, is a dynamic computed property which cannot be used

Re: How to query for 'any word' in a phrase

2020-01-09 Thread Tomoko Uchida
Hi, did you try or consider SpanNearQuery? You might need to insert some kind of spetial token (e.g., ) to the end of the text field to match the "end of the sentence" anyways. 2020年1月10日(金) 1:30 陈志祥 : > To be more clear,i think you need build a custom PhraseQuery class,which > can set each slop

回复: 回复:How to query for 'any word' in a phrase

2020-01-09 Thread 陈志祥
To be more clear,i think you need build a custom PhraseQuery class,which can set each slop value between sub terms,also you need a special WildchardTerm matching any term which is only used in this custom PhraseQuery context…… Or just use grep tool or regex automata to scan? 陈志祥

回复: 回复:How to query for 'any word' in a phrase

2020-01-09 Thread 陈志祥
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” 陈志祥 阿里巴巴 地图引擎核心算法工程师 电话:057128223456-81124100 邮箱:zhixiang@a

RE: 回复:How to query for 'any word' in a phrase

2020-01-09 Thread Jeroen Lauwers
I don’t understand your question: In general: can it be set? Yes, : PhraseQuery(int slop, String

回复:How to query for 'any word' in a phrase

2020-01-09 Thread 陈志祥
could the slop parameter in phasequery be dynamically set? 陈志祥 阿里巴巴 地图引擎核心算法工程师 电话:057128223456-81124100 邮箱:zhixiang@alibaba-inc.com 地址:上海-长宁-申通信息广场 阿里巴巴企业主页 信息安全声明:本邮件包含信息归发件人所在组织所有,发件人所在组织对该邮件拥有所有权利。 请接收者注意保

How to query for 'any word' in a phrase

2020-01-09 Thread Jeroen Lauwers
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