当前位置: 动力学知识库 > 问答 > 编程问答 >

How does FAST ESP's xrank operator work?

问题描述:

  • I have a bunch of documents in my index.
  • They all have "text" in field1. One has "boosttext" in field2.
  • I want FAST to put the document with "boosttext" to the front of the result set.

I tried this FQL query:

and(field1:string("text"), xrank(field2:string("boosttext", mode="AND"))

However, this will filter out all documents that do not have "boosttext" in field2 !!!

Has anyone successfully used xrank and can give me a hint? Thanks in advance.

-- Bob

网友答案:

... it seems that the following FQL expression works:

rank(field1:string("text"), xrank(field2:string("boosttext"))

-- Bob

网友答案:
xrank(field1:string("text"), field2:string("boosttext"), boost=100)

See: http://msdn.microsoft.com/en-us/library/ff394462.aspx

xrank(or(cat, dog), thoroughbred, boost=500, boostall=yes)
分享给朋友:
您可能感兴趣的文章:
随机阅读: