Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Niclas Schumacher 67 posts 87 karma points
    May 20, 2014 @ 16:43
    Niclas Schumacher
    0

    Lucene boost by 0

    Hello fellow searchers.

    Im building a search functionality, where i'd like to search on different types (nodeTypeAlias), but when getting a result on this, include that the score has been calculated, which means document at the very start has different scores, because my nodeTypeAlias's has different length. 
    for instance: 
    I have 4 documentTypes (nodeTypeAlias), news, user, activity. And just making a search like:
    +(nodeTypeAlias:news nodeTypeAlias:user nodeTypeAlias:acitivity) 

    This will generate diffent scores on the documents, which is not wanted. I'd like everything to have score on 1 based on that luceneQuery. 
    If i paste the luceneQuery directly into Luke, then it works as excepted, but when i do .SetBoost(0) it resolves into a ^.0, which lucene give an error on. 

    So the question is, how can i neutralize a term / query if i can't do it with SetBoost ?  (Im using Standard analyzer)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies