What is your problem? I mean what kind of real-world issue are you
requiring this behavior for? Or is this mostly so you can understand
scoring better?

Very often this kind of question is a test artifact. As far as I know,
the distance isn't part of the scoring, the fact that there's an extra
token between just isn't considered relevant (I may be dead wrong on
this, but...)...

So if this is theoretical, I believe the answer is "because distance
isn't part of the scoring formula".
If this is practical in that you need terms closer together to bubble
up to the top, then something phrase queries with slop and boosts
would help, something like
"aa bb"^100 OR "aa bb"~10^10 OR field:(aa bb)....

Best,
Erick

On Fri, Jun 6, 2014 at 5:48 AM, 郑华斌 <huabin.zh...@qq.com> wrote:
> hi,
>
>
> I have two docs,
>     a) "aa bb cc" and,
>     b) "aa cc bb".
> The query is "aa bb". What I expected is the doc a comes first with a higher 
> score than doc b because the term distance in query and that in doc a are 
> more similar.
> After google for a while I get it down with the span query q: "aa bb"~10. 
> However, when I change my query into "aa bb dd"~10, the span query return 
> nothing
> hits becuase dd can not be found in any doc. So what's a solution to this 
> problem?
>
>
> Thanks.

Reply via email to