Take a look at function queries. You're probably looking for "field", "termfreq" and "if" functions or some other combination like that.
On Sun, Jun 25, 2017 at 9:01 AM, govind nitk <govind.n...@gmail.com> wrote: > Hi Erik, Thanks for the reply. > > My intention of using the domain_ct in the qf was, giving the weight > present in the that document. > > e.g > qf=category^domain_ct > > if the current query matched in the category, the boost given will be > domain_ct, which is present in the current matched document. > > > So if I have category_1ct, category_2ct, category_3ct, category_4ct as 4 > indexed categories(text_general fields) and the same document has > domain_1ct, domain_2ct, domain_3ct, domain_4ct as 4 different count > fields(int), is there any way to achieve: > > qf=category_1ct^domain_1ct&qf=category_2ct^domain_2ct&qf=category_3ct^domain_3ct&qf=category_4ct^domain_4ct > ? > > > > > Regards > > > > > On Sat, Jun 24, 2017 at 3:42 PM, Erik Hatcher <erik.hatc...@gmail.com> > wrote: > >> With dismax use bf=domain_ct. you can also use boost=domain_ct with >> edismax. >> >> > On Jun 23, 2017, at 23:01, govind nitk <govind.n...@gmail.com> wrote: >> > >> > Hi Solr, >> > >> > My Index Data: >> > >> > id name category domain domain_ct >> > 1 Banana Fruits Home > Fruits > Banana 2 >> > 2 Orange Fruits Home > Fruits > Orange 4 >> > 3 Samsung Mobile Electronics > Mobile > Samsung 3 >> > >> > >> > I am able to retrieve the documents with dismax parser with the weights >> > mentioned as below. >> > >> > http://localhost:8983/solr/my_index/select?defType=dismax& >> indent=on&q=fruits&qf=category >> > ^0.9&qf=name^0.7&wt=json >> > >> > >> > Is it possible to retrieve the documents with weight taken from the >> indexed >> > field like: >> > >> > http://localhost:8983/solr/my_index/select?defType=dismax& >> indent=on&q=fruits&qf=category >> > ^domain_ct&qf=name^domain_ct&wt=json >> > >> > Is this possible to give weight from an indexed field ? Am I doing >> > something wrong? >> > Is there any other way of doing this? >> > >> > >> > Regards >>