You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by 大明 <zt...@foxmail.com> on 2020/02/27 12:28:49 UTC

Position And Offset in Solr Query

Hi all,&nbsp;


I am working in Chinese App. I am suffering a question of whether a PhraseQuery involved StartOffset and EndOffset of a term on SOLR.&nbsp;


For instance:
Text: 我是搜索应用开发者
Indexing: 我|是|搜索|应用开发|应用|开发者|开发|者
position:&nbsp; 1 | 2| 3&nbsp; &nbsp;| 4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 4&nbsp; &nbsp;| 5&nbsp; &nbsp; &nbsp;| 5&nbsp; &nbsp; | 5
querying:&nbsp; 我|是|搜索|应用|开发者


We have seen PhraseQuery base on Position. It works well expected for recalling nothing when the query is "应用|者".


Will PhraseQuery match documents according to 'StartOffset/EndOffset' of the terms? If so, it will filter the above document(应用|开发者|开发|者).


The question is HOW can I do set something on PhraseQuery for working within term's offset.
Or, maybe we have the other approaches to do that.


Thanks very much in advance.



-------------------------------
Daming
Apache SkyWalking