Hi all,

We need to boost a field in a document if field matches certain criteria.

For example:

if title contains "Secrete" , then we want to boost the field to 100 .

For this we have the below code in solrj api while indexing the document:


    Collection<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();

    SolrInputDocument doc = new SolrInputDocument();
    doc.addField("title", "Secrete" , 100.0f); // Field Boost
    doc.addField("id", 100001);
    doc.addField("modelnumber", "AK10005");
    doc.addField("name", "XXXXXX5");

    docs.add(doc);

Also , we made omitNorms="false" for this field in schema.xml

    <field name="title" type="string" indexed="true" stored="true"
required="true" omitNorms="false" />

But still we do not see this document coming at the top. Is there any other
setting which has to be done for index time boosting?


Best Regards,
Dinesh Naik


-- 
Best Regards,
Dinesh Naik

Reply via email to