Search code examples
javasolrsolrj

solrj can not boost results


I am new to solr . I tried to boost result by applying query

query.set("bq", "id:"
+ userId + "^100");

When I execute query it didn't boost result. Where I am missing?


Solution

  • It looks like you are missing defType as edismax

       query.set("defType", "edismax");
       query.set("bq", "id:" + userId + "^100");
    

    Hope so it will help you..