sorry, describle again. Document 1: little boy is runningDocument 2:boy is littleI mean that a query for "little boy" will match the both document. the Document that only has term "boy" and "little" will match the query. the document 1 add some sore beacuse it exactly match the query(term position totally match).do I describe clearly?
for example: Document 1: little boy is runningDocument 2:boy is littleI query "little boy" Document 1 add score 100(Exact match)Document 2 add score 0( not Exact match) ----- 原文 ----- 发件人: Ian Lea 主 题: Re: another question about phrasequery?(thanks again)时 间: 2010年3月22日 22:35:39 I'm not clear what exactly you are asking. With your examples:Document 1: little boy is runningDocument 2:boy is littlea phrase query for "little boy" will match the first and not thesecond. Is that what you want?a phrase query for "litter boy" won't match either, but a generalquery might match on boy depending on how you set your must/shouldqualifiers.So maybe you should have a 2 phase approach: do a phrase query andstop if you get hits or do a general non-phrase query if you don't.Alternatively issue both at the same time but with the phrase queryboosted.--Ian.On Mon, Mar 22, 2010 at 2:13 PM, luocanrao <luocan19826...@sohu.com> wrote:> I don't think the current phrasequery can meet my requirement.>> Can someone help me implement such a phrasequery?>>>> Exact match document add some score>> All other match document add 0 score.(no matter how big slop is)>>>> For example:>> Document 1: little boy is running>> Document 2:boy is little>>>> I query "little boy">> Document 1 add score 100(Exact match)>> Document 2 add score 0( not Exact match)>> But the two document can match the query.>> user that search "litter boy" should see both the Document,>> but the Document 1 is on the top!!>>>>---------------------------------------------------------------------To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.orgfor additional commands, e-mail: java-user-h...@lucene.apache.org